Skip to content

Commit

Permalink
Updated AutoHotkey lexer with more keywords and fold points.
Browse files Browse the repository at this point in the history
Thanks to helsmy.
  • Loading branch information
orbitalquark committed Mar 10, 2024
1 parent 751eea5 commit 683915b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/thanks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and better over the years.
* Haelwenn Monnier
* Hao Chi Kiang
* Heck Fy
* helsmy
* Hugo O. Rivera
* ittegrat
* Ivan Baidakou
Expand Down
10 changes: 7 additions & 3 deletions lexers/autohotkey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ lex:add_rule('number', lex:tag(lexer.NUMBER, lexer.number))
lex:add_rule('operator', lex:tag(lexer.OPERATOR, S('~+-^*/&<>=?:()[]{}')))

lex:set_word_list(lexer.KEYWORD, {
'as', 'and', 'contains', 'false', 'in', 'is', 'IsSet', 'not', 'or', 'super', 'true', 'unset',
'Break', 'Catch', 'Continue', 'Else', 'Finally', 'For', 'Global', 'Goto', 'If', 'Local', 'Loop',
'Return', 'Static', 'Throw', 'Try', 'Until', 'While'
'as', 'and', 'class', 'contains', 'extends', 'false', 'in', 'is', 'IsSet', 'not', 'or', 'super',
'true', 'unset', 'Break', 'Catch', 'Continue', 'Else', 'Finally', 'For', 'Global', 'Goto', 'If',
'Local', 'Loop', 'Return', 'Static', 'Throw', 'Try', 'Until', 'While'
})

lex:set_word_list(lexer.FUNCTION_BUILTIN, {
Expand Down Expand Up @@ -157,4 +157,8 @@ lex:set_word_list(lexer.VARIABLE_BUILTIN, {

lexer.property['scintillua.comment'] = ';'

-- Fold points.
lex:add_fold_point(lexer.OPERATOR, '{', '}')
lex:add_fold_point(lexer.COMMENT, '/*', '*/')

return lex

0 comments on commit 683915b

Please sign in to comment.