From 4c4392d29df777ff702dfe99b4f3c23142976e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Fri, 11 Aug 2023 01:27:32 +0200 Subject: update lexers to orbitalquark/scintillua@b789dde Rather than cherry pick patches from after 6.2 we will just grab everything as is. --- lua/lexers/julia.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lua/lexers/julia.lua') 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 -- cgit v1.2.3