Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cfengine3: Removed rule attempting to highlight variable names
This rule is problematic for 2 reasons:
* The regex is buggy, it doesn't work for more advanced cases
  when there are other attributes before slist, or string, or
  whatever the type is.
* In the context of CFEngine policy language, it's just a bit
  confusing. Yes, they are variable names, but they are also
  quoted strings, and what we call promisers. It looks better,
  more consistent and less confusing if they are highlighted
  in the same way as other strings and promisers.

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
  • Loading branch information
olehermanse authored and alecthomas committed Aug 12, 2022
1 parent 111921a commit 6538430
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lexers/embedded/cfengine3.xml
Expand Up @@ -70,18 +70,6 @@
<token type="NameFunction"/>
</bygroups>
</rule>
<rule pattern="(&#34;)([^&#34;]+)(&#34;)(\s+)(string|slist|int|real)(\s*)(=&gt;)(\s*)">
<bygroups>
<token type="Punctuation"/>
<token type="NameVariable"/>
<token type="Punctuation"/>
<token type="Text"/>
<token type="KeywordType"/>
<token type="Text"/>
<token type="Operator"/>
<token type="Text"/>
</bygroups>
</rule>
<rule pattern="(\S+)(\s*)(=&gt;)(\s*)">
<bygroups>
<token type="KeywordReserved"/>
Expand Down

0 comments on commit 6538430

Please sign in to comment.