Fix lexer bug.

This commit is contained in:
William Candillon 2013-01-27 10:14:03 +01:00 • committed by nightwing
commit e553f13cef
4 changed files with 2851 additions and 3080 deletions

View file

@ -1,281 +1,44 @@
<<<<<<< .mine
[[ [[
"start", "[\"start\"]",
["keyword","xquery"], ["keyword","xquery"],
["text"," "], ["text"," "],
["keyword","version"], ["keyword","version"],
["text"," "], ["text"," "],
["string","\"1.0\""], ["string","\""],
["string","1.0"],
["string","\""],
["text",";"] ["text",";"]
],[ ],[
"start" "[\"start\"]"
],[ ],[
"start", "[\"start\"]",
["keyword","let"], ["keyword","let"],
["text"," "], ["text"," "],
["variable","$message"], ["variable","$message"],
["text"," "], ["text"," "],
["keyword.operator",":="], ["keyword.operator",":="],
["text"," "], ["text"," "],
["string","\"Hello World!\""] ["string","\""],
["string","Hello World!"],
["string","\""]
],[ ],[
"start", "[\"start\",\"StartTag\",\"TagContent\"]",
["keyword","return"], ["keyword","return"],
["text"," "], ["text"," "],
["text","<"], ["meta.tag","<results"],
["meta.tag","results"], ["meta.tag",">"]
["text",">"]
],[ ],[
"start", "[\"start\",\"StartTag\",\"TagContent\"]",
["text"," "], ["text"," "],
["text","<"], ["meta.tag","<message"],
["meta.tag","message"], ["meta.tag",">"],
["text",">"], ["text","{"],
["lparen","{"],
["variable","$message"], ["variable","$message"],
["rparen","}"], ["text","}"],
["text","</"], ["meta.tag","</message>"]
["meta.tag","message"],
["text",">"]
],[ ],[
"start", "[\"start\"]",
["text","</"], ["meta.tag","</results>"]
["meta.tag","results"],
["text",">"]
],[ ],[
"start" "[\"start\"]"
]] ]]
=======
[
[
"[\"start\"]",
[
"keyword",
"xquery"
],
[
"text",
" "
],
[
"keyword",
"version"
],
[
"text",
" "
],
[
"string",
"\""
],
[
"string",
"1.0"
],
[
"string",
"\""
],
[
"text",
";"
]
],
[
"[\"start\"]"
],
[
"[\"start\"]",
[
"keyword",
"let"
],
[
"text",
" "
],
[
"variable",
"$message"
],
[
"text",
" "
],
[
"keyword.operator",
":="
],
[
"text",
" "
],
[
"string",
"\""
],
[
"string",
"Hello World!"
],
[
"string",
"\""
]
],
[
"[\"start\",\"StartTag\",\"TagContent\"]",
[
"keyword",
"return"
],
[
"text",
" "
],
[
"meta.tag",
"<results"
],
[
"meta.tag",
">"
]
],
[
"[\"start\",\"StartTag\",\"TagContent\"]",
[
"text",
" "
],
[
"meta.tag",
"<message"
],
[
"meta.tag",
">"
],
[
"text",
"{"
],
[
"variable",
"$message"
],
[
"text",
"}"
],
[
"meta.tag",
"</message>"
]
],
[
"[\"start\"]",
[
"meta.tag",
"</results>"
]
],
[
"[\"start\"]"
]
]
>>>>>>> .theirs

View file

@ -52,6 +52,7 @@ start ::= '<![CDATA['
| "]" | "]"
| "," | ","
| "." | "."
| ";"
| Annotation | Annotation
| ModuleDecl | ModuleDecl
| OptionDecl | OptionDecl

File diff suppressed because it is too large Load diff

View file

@ -40,7 +40,7 @@ define(function(require, exports, module) {
return this.tokens; return this.tokens;
}; };
this.EQName = function(node) this.EQName = this.NCName = function(node)
{ {
var row = node.pos.sl; var row = node.pos.sl;
this.tokens[row] = this.tokens[row] === undefined ? [] : this.tokens[row]; this.tokens[row] = this.tokens[row] === undefined ? [] : this.tokens[row];