1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 00:59:31 +00:00

Rename format to {}

This commit is contained in:
Étienne Fildadut 2021-06-05 00:06:00 +02:00
parent 64bc85741a
commit 198c06e2e8
7 changed files with 17 additions and 11 deletions

View file

@ -34,8 +34,10 @@ common = {
"!=", "==", ">=", "<=", "<", ">",
"+", "-",
"*", "//", "/", "%",
"::", ":",
"!",
"^", "::", ":", "()"
"^",
"()", "{}"
},
-- escapement code and their value in strings
-- I don't think there's a point in supporting form feed, carriage return, and other printer and terminal related codes
@ -136,7 +138,7 @@ common = {
if not exp then return nil, rem end
if not rem:match("^%s*}") then return nil, ("expected closing } at end of expression before %q"):format(rem) end
-- wrap in format() call
local variant, err = common.find_function_variant(state, namespace, "format", exp, true)
local variant, err = common.find_function_variant(state, namespace, "{}", exp, true)
if not variant then return variant, err end
-- add to text
table.insert(l, variant)