diff options
| author | Matěj Cepl <mcepl@cepl.eu> | 2023-08-11 01:27:32 +0200 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2024-03-27 06:04:21 -0600 |
| commit | 4c4392d29df777ff702dfe99b4f3c23142976e05 (patch) | |
| tree | 5355324abe18952f7d19d6cfc5dbeb5d6cb72b84 /lua/lexers/julia.lua | |
| parent | 95bf9f59f8a9a37148bdc0787db378d62c7cd032 (diff) | |
| download | vis-4c4392d29df777ff702dfe99b4f3c23142976e05.tar.gz vis-4c4392d29df777ff702dfe99b4f3c23142976e05.tar.xz | |
update lexers to orbitalquark/scintillua@b789dde
Rather than cherry pick patches from after 6.2 we will just grab
everything as is.
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 |
