Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

SpanClass finetuning #21

Open
asillye opened this issue Dec 4, 2014 · 0 comments
Open

SpanClass finetuning #21

asillye opened this issue Dec 4, 2014 · 0 comments

Comments

@asillye
Copy link

asillye commented Dec 4, 2014

This is a minor glitch only.. when using SpanClasses the coloring has two issues. Consider:
span class Keyword = ( ['a'..'z', '_']['a'..'z', '_', '-']+ ) - "disable";
syntax OptionalDisable = DM=(DisableKeyword sm)?;
[SpanClass(SpanWarning)]
syntax DisableKeyword = "disable";

We set SpanWarning to a different color and yellow background color. The purpose is to make the 'disable' keyword stand out.

Problem 1: we had to subtract the disable word from keywords, otherwise the SpanClass on the DisableKeyword will not be applied. This is a matter of taste, however it would be nice, if the explicit SpanWarning on the DisableKeyword syntax element would have priority compared to the generic Keyword one.

Problem 2: with the above setup the sm space after the disable will get highlighted to yellow.
e.g. disable scenario [XY] {... } will highlight the space between disable and scenario while the spanclass is only defined for DisableKeyword.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant