Closed Fandangi closed 6 years ago
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.
Sorry - I meant this to be i the codemirror-grammar area, I will add if there. Please close this case.
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.
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
Am I being too hopeful, or is there a correct approach to the above requirement.