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

Condition line -> expression line

This commit is contained in:
Étienne Fildadut 2021-04-08 13:21:47 +02:00
parent e1b0b17fc6
commit eb6da84878
2 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@ local escapeCache = {}
local common
common = {
--- valid identifier pattern
identifier_pattern = "[^%%%/%*%+%-%(%)%!%&%|%=%$%?%>%<%:%{%}%[%]%,%\"]+",
identifier_pattern = "[^%%%/%*%+%-%(%)%!%&%|%=%$%§%?%>%<%:%{%}%[%]%,%\"]+",
--- escape a string to be used as an exact match pattern
escape = function(str)
if not escapeCache[str] then
@ -39,7 +39,7 @@ common = {
end
return nil, ("can't find %q in namespace %s"):format(name, namespace)
end,
--- transform an identifier into a clean version
--- transform an identifier into a clean version (trim & alias)
format_identifier = function(identifier, state)
local r = identifier:gsub("[^%.]+", function(str)
str = common.trim(str)