mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-09 13:23:51 +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">
|
<rule pattern="#.*?\n">
|
||||||
<token type="Comment"/>
|
<token type="Comment"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule pattern="@.*?\n">
|
<rule pattern="^@.*?\n">
|
||||||
<token type="CommentPreproc"/>
|
<token type="CommentPreproc"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule pattern="(body)(\s+)(\S+)(\s+)(control)">
|
<rule pattern="(body)(\s+)(\S+)(\s+)(control)">
|
||||||
@ -78,6 +78,12 @@
|
|||||||
<token type="Text"/>
|
<token type="Text"/>
|
||||||
</bygroups>
|
</bygroups>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule pattern="([\w.!&|()"$]+)(::)">
|
||||||
|
<bygroups>
|
||||||
|
<token type="NameClass"/>
|
||||||
|
<token type="Punctuation"/>
|
||||||
|
</bygroups>
|
||||||
|
</rule>
|
||||||
<rule pattern=""">
|
<rule pattern=""">
|
||||||
<token type="LiteralString"/>
|
<token type="LiteralString"/>
|
||||||
<push state="doublequotestring"/>
|
<push state="doublequotestring"/>
|
||||||
@ -96,12 +102,6 @@
|
|||||||
<token type="Punctuation"/>
|
<token type="Punctuation"/>
|
||||||
</bygroups>
|
</bygroups>
|
||||||
</rule>
|
</rule>
|
||||||
<rule pattern="([\w.!&|()]+)(::)">
|
|
||||||
<bygroups>
|
|
||||||
<token type="NameClass"/>
|
|
||||||
<token type="Punctuation"/>
|
|
||||||
</bygroups>
|
|
||||||
</rule>
|
|
||||||
<rule pattern="(\w+)(:)">
|
<rule pattern="(\w+)(:)">
|
||||||
<bygroups>
|
<bygroups>
|
||||||
<token type="KeywordDeclaration"/>
|
<token type="KeywordDeclaration"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user