From c1f4d3f68787fa2ae964c468d28a84df37319b28 Mon Sep 17 00:00:00 2001 From: orbitalquark <70453897+orbitalquark@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:30:49 -0400 Subject: lexers: switch to tabs for indentation --- lua/lexers/fantom.lua | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lua/lexers/fantom.lua') diff --git a/lua/lexers/fantom.lua b/lua/lexers/fantom.lua index 47952da..1a02483 100644 --- a/lua/lexers/fantom.lua +++ b/lua/lexers/fantom.lua @@ -15,39 +15,39 @@ lex:add_rule('whitespace', ws) -- Classes. local type = token(lexer.TYPE, lexer.word) lex:add_rule('class_sequence', - token(lexer.KEYWORD, 'class') * ws * type * ( -- at most one inheritance spec - ws * token(lexer.OPERATOR, ':') * ws * type * - ( -- at least 0 (i.e. any number) of additional classes - ws^-1 * token(lexer.OPERATOR, ',') * ws^-1 * type)^0)^-1) + token(lexer.KEYWORD, 'class') * ws * type * ( -- at most one inheritance spec + ws * token(lexer.OPERATOR, ':') * ws * type * + ( -- at least 0 (i.e. any number) of additional classes + ws^-1 * token(lexer.OPERATOR, ',') * ws^-1 * type)^0)^-1) -- Keywords. lex:add_rule('keyword', token(lexer.KEYWORD, word_match{ - 'using', 'native', -- external - 'goto', 'void', 'serializable', 'volatile', -- error - 'if', 'else', 'switch', -- conditional - 'do', 'while', 'for', 'foreach', 'each', -- repeat - 'true', 'false', -- boolean - 'null', -- constant - 'this', 'super', -- typedef - 'new', 'is', 'isnot', 'as', -- operator - 'plus', 'minus', 'mult', 'div', 'mod', 'get', 'set', 'slice', 'lshift', 'rshift', 'and', 'or', - 'xor', 'inverse', 'negate', -- - 'increment', 'decrement', 'equals', 'compare', -- long operator - 'return', -- stmt - 'static', 'const', 'final', -- storage class - 'virtual', 'override', 'once', -- slot - 'readonly', -- field - 'throw', 'try', 'catch', 'finally', -- exceptions - 'assert', -- assert - 'class', 'enum', 'mixin', -- typedef - 'break', 'continue', -- branch - 'default', 'case', -- labels - 'public', 'internal', 'protected', 'private', 'abstract' -- scope decl + 'using', 'native', -- external + 'goto', 'void', 'serializable', 'volatile', -- error + 'if', 'else', 'switch', -- conditional + 'do', 'while', 'for', 'foreach', 'each', -- repeat + 'true', 'false', -- boolean + 'null', -- constant + 'this', 'super', -- typedef + 'new', 'is', 'isnot', 'as', -- operator + 'plus', 'minus', 'mult', 'div', 'mod', 'get', 'set', 'slice', 'lshift', 'rshift', 'and', 'or', + 'xor', 'inverse', 'negate', -- + 'increment', 'decrement', 'equals', 'compare', -- long operator + 'return', -- stmt + 'static', 'const', 'final', -- storage class + 'virtual', 'override', 'once', -- slot + 'readonly', -- field + 'throw', 'try', 'catch', 'finally', -- exceptions + 'assert', -- assert + 'class', 'enum', 'mixin', -- typedef + 'break', 'continue', -- branch + 'default', 'case', -- labels + 'public', 'internal', 'protected', 'private', 'abstract' -- scope decl })) -- Types. lex:add_rule('type', token(lexer.TYPE, word_match( - 'Void Bool Int Float Decimal Str Duration Uri Type Range List Map Obj Err Env'))) + 'Void Bool Int Float Decimal Str Duration Uri Type Range List Map Obj Err Env'))) -- Functions. -- lex:add_rule('function', token(lexer.FUNCTION, lexer.word) * #P('(')) -- cgit v1.2.3