Skip to content

Commit

Permalink
Update GAS lexer (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Forest0923 committed Aug 22, 2022
1 parent cde3818 commit 4fa270a
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions lexers/embedded/gas.xml
Expand Up @@ -48,10 +48,24 @@
<rule pattern="(?:0[xX][a-zA-Z0-9]+|\d+)">
<token type="LiteralNumberInteger"/>
</rule>
<rule pattern="%(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)">
<token type="NameVariable"/>
</rule>
<rule pattern="[\r\n]+">
<token type="Text"/>
<pop depth="1"/>
</rule>
<rule pattern="([;#]|//).*?\n">
<token type="CommentSingle"/>
<pop depth="1"/>
</rule>
<rule pattern="/[*].*?[*]/">
<token type="CommentMultiline"/>
</rule>
<rule pattern="/[*].*?\n[\w\W]*?[*]/">
<token type="CommentMultiline"/>
<pop depth="1"/>
</rule>
<rule>
<include state="punctuation"/>
</rule>
Expand Down Expand Up @@ -99,6 +113,17 @@
<token type="Text"/>
<pop depth="1"/>
</rule>
<rule pattern="([;#]|//).*?\n">
<token type="CommentSingle"/>
<pop depth="1"/>
</rule>
<rule pattern="/[*].*?[*]/">
<token type="CommentMultiline"/>
</rule>
<rule pattern="/[*].*?\n[\w\W]*?[*]/">
<token type="CommentMultiline"/>
<pop depth="1"/>
</rule>
<rule>
<include state="punctuation"/>
</rule>
Expand All @@ -113,9 +138,12 @@
<rule pattern="\s+">
<token type="Text"/>
</rule>
<rule pattern="[;#].*?\n">
<token type="Comment"/>
<rule pattern="([;#]|//).*?\n">
<token type="CommentSingle"/>
</rule>
<rule pattern="/[*][\w\W]*?[*]/">
<token type="CommentMultiline"/>
</rule>
</state>
</rules>
</lexer>
</lexer>

0 comments on commit 4fa270a

Please sign in to comment.