diff options
Diffstat (limited to 'lua/lexers/julia.lua')
| -rw-r--r-- | lua/lexers/julia.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lua/lexers/julia.lua b/lua/lexers/julia.lua index 0e751a0..6b5334b 100644 --- a/lua/lexers/julia.lua +++ b/lua/lexers/julia.lua @@ -1,4 +1,4 @@ --- Copyright 2020-2022 Tobias Frilling. See LICENSE. +-- Copyright 2020-2024 Tobias Frilling. See LICENSE. -- Julia lexer. local lexer = require('lexer') @@ -53,12 +53,11 @@ lex:add_rule('type', token(lexer.TYPE, type_builtin_range + type_builtin_array)) -- Macro -lex:add_rule('macro', token('macro', '@' * (id + '.'))) -lex:add_style('macro', lexer.styles.preprocessor) +lex:add_rule('macro', token(lexer.PREPROCESSOR, '@' * (id + '.'))) -- Symbol lex:add_rule('symbol', token('symbol', -B(P(':') + '<') * ':' * id)) -lex:add_style('symbol', lexer.styles.constant) +lex:add_style('symbol', lexer.styles.string) -- Function lex:add_rule('function', token(lexer.FUNCTION, id * #(P('.')^-1 * '('))) @@ -105,6 +104,9 @@ lex:add_rule('character', token('character', char)) lex:add_style('character', lexer.styles.constant) -- Operator -lex:add_rule('operator', token(lexer.OPERATOR, S('+-*/÷<>=!≠≈≤≥%^&|⊻~\\\':?.√'))) +lex:add_rule('operator', token(lexer.OPERATOR, S('+-*/<>=!%^&|~\\\':?.') + '÷' + '≠' + '≈' + + '≤' + '≥' + '⊻' + '√')) + +lexer.property['scintillua.comment'] = '#' return lex |
