Merge pull request #918 from wcandillon/master
Update XQuery parser with the latest XQuery 3.0 syntax
This commit is contained in:
commit
86750fbadb
6 changed files with 18245 additions and 15706 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -40,6 +40,7 @@ define(function(require, exports, module){
|
|||
var resultLines = new Array(this.source.length);
|
||||
var resultStates = new Array(this.source.length);
|
||||
var previousState = "start";
|
||||
var i = 0;
|
||||
for(i in this.source){
|
||||
var lineTokens = [];
|
||||
var tokens = [];
|
||||
|
|
@ -49,6 +50,7 @@ define(function(require, exports, module){
|
|||
var sourceLine = this.source[i];
|
||||
var tokenizedLine = "";
|
||||
var cursor = 0;
|
||||
var j = 0;
|
||||
for(j in tokens)
|
||||
{
|
||||
var token = tokens[j];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|||
var XQueryHighlightRules = function() {
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
keyword: "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"
|
||||
keyword: "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"
|
||||
}, "identifier");
|
||||
|
||||
// regexp must not have capturing parentheses
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue