From d6b26632eb74fba5ae1ed2a2626feb5ea428937a Mon Sep 17 00:00:00 2001 From: William Candillon Date: Mon, 25 Feb 2013 16:00:12 +0100 Subject: [PATCH] Fix lexer bug. --- lib/ace/mode/xquery/XQueryLexer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ace/mode/xquery/XQueryLexer.js b/lib/ace/mode/xquery/XQueryLexer.js index 66a807d9..53fdebcc 100644 --- a/lib/ace/mode/xquery/XQueryLexer.js +++ b/lib/ace/mode/xquery/XQueryLexer.js @@ -62,7 +62,7 @@ define(function(require, exports, module){ }; }; - var keys = "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position".split("|"); + var keys = "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position|strict".split("|"); var keywords = keys.map( function(val) { return { name: "'" + val + "'", token: "keyword" }; } ); @@ -100,8 +100,8 @@ define(function(require, exports, module){ { name: "'('", token:"lparen" }, { name: "')'", token:"rparen" }, { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } }, - { name: "'}'", token: "text", next: function(stack){ if(stack.length > 1) { stack.pop(); } } }, - { name: "'{'", token: "text" } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } } + { name: "'}'", token: "text", next: function(stack){ if(stack.length > 1) stack.pop(); } }, + { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } } ].concat(keywords), _EQName: [ { name: "EQName", token: "text", next: function(stack) { stack.pop(); } }