| 281 | |
| 282 | // tokenizer for variables |
| 283 | function tokenVariable(stream, state) { |
| 284 | var isVariableChar = /[\w\$_-]/; |
| 285 | |
| 286 | // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote |
| 287 | if(stream.eat("\"")) { |
| 288 | while(stream.next() !== '\"'){}; |
| 289 | stream.eat(":"); |
| 290 | } else { |
| 291 | stream.eatWhile(isVariableChar); |
| 292 | if(!stream.match(":=", false)) stream.eat(":"); |
| 293 | } |
| 294 | stream.eatWhile(isVariableChar); |
| 295 | state.tokenize = tokenBase; |
| 296 | return ret("variable", "variable"); |
| 297 | } |
| 298 | |
| 299 | // tokenizer for XML tags |
| 300 | function tokenTag(name, isclose) { |