vendor/assets/javascripts/codemirror/modes/xquery.js in codemirror-rails-2.32 vs vendor/assets/javascripts/codemirror/modes/xquery.js in codemirror-rails-2.33

- old
+ new

@@ -54,11 +54,11 @@ 'following-sibling','follows','for','function','if','import','in','instance','intersect','item', 'let','module','namespace','node','node','of','only','or','order','parent','precedes','preceding', 'preceding-sibling','processing-instruction','ref','return','returns','satisfies','schema','schema-element', 'self','some','sortby','stable','text','then','to','treat','typeswitch','union','variable','version','where', 'xquery', 'empty-sequence']; - for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i])}; + for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);}; // a list of types. For each add a property to kwObj with the value of // {type: "atom", style: "atom"} var types = ['xs:string', 'xs:float', 'xs:decimal', 'xs:double', 'xs:integer', 'xs:boolean', 'xs:date', 'xs:dateTime', 'xs:time', 'xs:duration', 'xs:dayTimeDuration', 'xs:time', 'xs:yearMonthDuration', 'numeric', 'xs:hexBinary', @@ -189,11 +189,11 @@ // gobble up a word if the character is not known if(!known) stream.eatWhile(/[\w\$_-]/); // gobble a colon in the case that is a lib func type call fn:doc - var foundColon = stream.eat(":") + var foundColon = stream.eat(":"); // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier // which should get matched as a keyword if(!stream.eat(":") && foundColon) { stream.eatWhile(/[\w\$_-]/); @@ -323,11 +323,11 @@ } else { state.tokenize = tokenBase; } return ret("tag", "tag"); - } + }; } // tokenizer for XML attributes function tokenAttribute(stream, state) { var ch = stream.next(); @@ -363,10 +363,11 @@ return ret("attribute", "attribute"); } // handle comments, including nested function tokenXMLComment(stream, state) { + var ch; while (ch = stream.next()) { if (ch == "-" && stream.match("->", true)) { state.tokenize = tokenBase; return ret("comment", "comment"); } @@ -374,20 +375,22 @@ } // handle CDATA function tokenCDATA(stream, state) { + var ch; while (ch = stream.next()) { if (ch == "]" && stream.match("]", true)) { state.tokenize = tokenBase; return ret("comment", "comment"); } } } // handle preprocessing instructions function tokenPreProcessing(stream, state) { + var ch; while (ch = stream.next()) { if (ch == "?" && stream.match(">", true)) { state.tokenize = tokenBase; return ret("comment", "comment meta"); } @@ -420,10 +423,10 @@ state.stack.push(newState); } function popStateStack(state) { var popped = state.stack.pop(); - var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize + var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize; state.tokenize = reinstateTokenize || tokenBase; } // the interface for the mode API return {