-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
In the following line, I am trying to catch 'var', '=' and 'somevar' separately and assign styles.
var=somevar
I have defined in the lex section 'var', eq and 'subs', and these work well.
,"var" : "RE::/(var)(?:(?=\\s)|(?=\\t)|(?==)|$)/gim"
,"eq" : "RE::/\\s*=\\s*/gim"
,"subs" : "RE::/[A-Za-z$][A-Za-z0-9$]*/"
I am having trouble with the 'somevar' part as I believe I can only identify it accurately as a subs type following after types var and eq.
My sequence is currently
"Syntax" : {
"subs1" : {"sequence":["var", "eq", "subs"]}
,"js" : " comment | eq | operator | var | subs1 | subs | keyword "
},
Am I being too hopeful, or is there a correct approach to the above requirement.
Metadata
Metadata
Assignees
Labels
No labels