We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using lpeg 1.0.1-1 and lua 5.3.3, I find that
for kind, text in lxsh.lexers.lua.gmatch 'sleep(5); if x >= 0 then print(x) else print(-x) end' do print(kind, text) end
outputs
identifier sleep operator ( number 5 operator ) operator ; whitespace identifier if whitespace identifier x whitespace operator >= whitespace number 0 whitespace identifier then whitespace identifier print operator ( identifier x operator ) whitespace identifier else whitespace identifier print operator ( operator - identifier x operator ) whitespace identifier end
It considers all keywords to be identifiers. Only if a keyword is the first token of the string it gets the kind classifier.
kind
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using lpeg 1.0.1-1 and lua 5.3.3, I find that
outputs
It considers all keywords to be identifiers. Only if a keyword is the first token of the string it gets the
kind
classifier.The text was updated successfully, but these errors were encountered: