diff options
| author | Christian Hesse <mail@eworm.de> | 2026-01-05 15:01:19 +0100 |
|---|---|---|
| committer | Christian Hesse <mail@eworm.de> | 2026-01-07 11:17:53 +0100 |
| commit | b8fea9bcb14ea10e618c539c400139dd43d90e02 (patch) | |
| tree | 753671e1e0a21908305c5162f09cb0f52a9eb9ef /lua/lexers/lexer.lua | |
| parent | 0d9bbb74c6de959ab7c6b93b7a97f9f2e643e8e8 (diff) | |
| download | vis-b8fea9bcb14ea10e618c539c400139dd43d90e02.tar.gz vis-b8fea9bcb14ea10e618c539c400139dd43d90e02.tar.xz | |
support lua 5.5...
... and replace the functions for unsigned integers with their
signed equivalents, using a type cast where needed.
Actually the functions for unsigned integers were deprecated since
lua 5.3...
https://www.lua.org/manual/5.3/manual.html#8.3
Also lua_newstate() requires a third argument since 5.5...
https://www.lua.org/manual/5.5/manual.html#8.3
Finally the key in a for loop is now const, so use a temporary
variable instead.
Diffstat (limited to 'lua/lexers/lexer.lua')
| -rw-r--r-- | lua/lexers/lexer.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/lexers/lexer.lua b/lua/lexers/lexer.lua index 7251ed2..b37e0de 100644 --- a/lua/lexers/lexer.lua +++ b/lua/lexers/lexer.lua @@ -1091,9 +1091,9 @@ function M.embed(lexer, child, start_rule, end_rule) if child._WORDLISTS then for name, i in pairs(child._WORDLISTS) do if type(name) == 'string' and type(i) == 'number' then - name = child._name .. '.' .. name - lexer:word_match(name) -- for side effects - lexer:set_word_list(name, child._WORDLISTS[i]) + tname = child._name .. '.' .. name + lexer:word_match(tname) -- for side effects + lexer:set_word_list(tname, child._WORDLISTS[i]) end end end |
