Skip to content

Commit

Permalink
Add hash and thick arrow expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinggaard committed Jun 24, 2024
1 parent 97c62a5 commit 3fd6048
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SctLexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CustomLexer(RegexLexer):
'root': [
(r'//[^\r\n]*', Comment.Single,),
(r'[ \t\r\n]+', Whitespace,),

(r'int', Keyword.Type),
(r'float', Keyword.Type),
(r'void', Keyword.Type),
Expand All @@ -27,7 +27,8 @@ class CustomLexer(RegexLexer):
(r'exit(?=\s*;)', Keyword.Reserved,),
(r'continue(?=\s*;)', Keyword.Reserved,),
(r'break(?=\s*;)', Keyword.Reserved,),

(r'#', Keyword.Reserved,),

(r'=', Operator,),
(r'\*', Operator,),
(r'/', Operator,),
Expand All @@ -52,6 +53,7 @@ class CustomLexer(RegexLexer):

(r'(state)(\s+)(\w+)', bygroups(Keyword.Declaration, Token.Text.Whitespace, Name.Label)),
(r'(enter)(\s+)(\w+)', bygroups(Keyword.Reserved, Token.Text.Whitespace, Name.Label)),
(r'(=>)(\s+)(\w+)', bygroups(Punctuation, Token.Text.Whitespace, Name.Label)),

(r'(decorator)(\s+)(\w+)', bygroups(Keyword.Declaration, Token.Text.Whitespace, Name.Decorator)),
(r'@\w+', Name.Decorator,),
Expand Down

0 comments on commit 3fd6048

Please sign in to comment.