LuaLexer: Lex variables, properties, and function calls by Nerixyz · Pull Request #2829 · pygments/pygments

This PR improves the LuaLexer in that it can now detect variables, properties, and function calls. Accesses and/or calls like foo.bar:baz() now yield (excluding punctuation) variable, property, function. This required refactoring the detection of builtins (first commit).

One thing the lexer gets slightly wrong is that it will yield "variable" for table properties ({ foo = 1 }). Detecting this would require much more state (essentially for every scope).

The lexer now also makes use of Text.Whitespace.