mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-05 13:05:18 +02:00
cfengine3 (#766)
* Fix CommentPreproc Macros (i.e.) CommentPreproc need to be anchored as they are only allowed to be put on the start of the line. This also solved the conflict with nakedvar @(....). Signed-off-by: Miek Gieben <miek@miek.nl> * Fix NameClass NameClass (`xxx::`) can _also_ contain variables, so add " and $ to the allowed list in the regexp. This now also needs to be put earlier to match before any strings. Signed-off-by: Miek Gieben <miek@miek.nl> --------- Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
7e30655df1
commit
cc132eda75
@ -38,7 +38,7 @@
|
||||
<rule pattern="#.*?\n">
|
||||
<token type="Comment"/>
|
||||
</rule>
|
||||
<rule pattern="@.*?\n">
|
||||
<rule pattern="^@.*?\n">
|
||||
<token type="CommentPreproc"/>
|
||||
</rule>
|
||||
<rule pattern="(body)(\s+)(\S+)(\s+)(control)">
|
||||
@ -78,6 +78,12 @@
|
||||
<token type="Text"/>
|
||||
</bygroups>
|
||||
</rule>
|
||||
<rule pattern="([\w.!&|()"$]+)(::)">
|
||||
<bygroups>
|
||||
<token type="NameClass"/>
|
||||
<token type="Punctuation"/>
|
||||
</bygroups>
|
||||
</rule>
|
||||
<rule pattern=""">
|
||||
<token type="LiteralString"/>
|
||||
<push state="doublequotestring"/>
|
||||
@ -96,12 +102,6 @@
|
||||
<token type="Punctuation"/>
|
||||
</bygroups>
|
||||
</rule>
|
||||
<rule pattern="([\w.!&|()]+)(::)">
|
||||
<bygroups>
|
||||
<token type="NameClass"/>
|
||||
<token type="Punctuation"/>
|
||||
</bygroups>
|
||||
</rule>
|
||||
<rule pattern="(\w+)(:)">
|
||||
<bygroups>
|
||||
<token type="KeywordDeclaration"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user