Skip to content

Commit

Permalink
Do not highlight C struct members as builtin constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitalquark committed Dec 4, 2022
1 parent 4e8f639 commit ef1b2e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lexers/ansi_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ local method = (B('.') + B('->')) * lex:tag(lexer.FUNCTION_METHOD, lexer.word)
lex:add_rule('function', (builtin_func + method + func) * #(lexer.space^0 * '('))

-- Constants.
lex:add_rule('constants', lex:tag(lexer.CONSTANT_BUILTIN, lex:word_match(lexer.CONSTANT_BUILTIN)))
lex:add_rule('constants', lex:tag(lexer.CONSTANT_BUILTIN,
-(B('.') + B('->')) * lex:word_match(lexer.CONSTANT_BUILTIN)))

-- Labels.
lex:add_rule('label', lex:tag(lexer.LABEL, lexer.starts_line(lexer.word * ':')))
Expand Down

0 comments on commit ef1b2e5

Please sign in to comment.