Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update GAS lexer
  • Loading branch information
Forest0923 committed Aug 21, 2022
commit b9b444e3fcb60960f2142d8fab3d7b2574ca10d5
34 changes: 31 additions & 3 deletions lexers/embedded/gas.xml
Original file line number Diff line number Diff line change
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>