/***/

// CodeMirror, copyright (c) by Marijn Haverbeke and others

// CommonJS

// Distributed under an MIT license: https://codemirror.net/5/LICENSE

// The keywords object is set to the result of this self executing

// a list of types. For each add a property to kwObj with the value of

// a variable may start with a quoted EQName so if the next character is quote, consume to the next quote

// an XML tag (if not in some sub, chained tokenizer)

// as previously checked, if the word is element,attribute, axis specifier, call it an "xmlconstructor" and

// assume we've already eaten a quote (")

// convenience functions used to build keywords object

// each axis_specifiers will add a property to kwObj with value of {type: "axis_specifier", style: "qualifier"}

// each operator will add a property to kwObj with value of {type: "operator", style: "keyword"}

// function. Each keyword is a property of the keywords object whose

// functions to test the current context of the state

// gobble a colon in the case that is a lib func type call fn:doc

// gobble up a word if the character is not known

// handle CDATA

// handle comments, including nested

// handle preprocessing instructions

// if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort)

// if the previous word was element, attribute, axis specifier, this word should be the name of that

// if there's a EQName ahead, consume the rest of the string portion, it's likely a function

// if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier

// if we think it's a function call but not yet known,

// if we're in a string and in an XML block, allow an embedded code block

// if we're in a string and in an XML block, allow an embedded code block in an attribute

// is the word a keyword?

// kwObj is what is return from this function at the end

// optionally pass a tokenizer function to set state.tokenize back to when finished

// push the stack so we know to look for it on the next word

// quoted string

// self closing tag without attributes?

// set style to variable for now for lack of something better

// start code block

// the case where the attribute has not value and the tag was closed

// the interface for the mode API

// the primary mode tokenizer

// tokenizer for XML attributes

// tokenizer for XML tags

// tokenizer for string literals

// tokenizer for variables

// value is {type: atype, style: astyle}

// variable

// which should get matched as a keyword

// {type: "atom", style: "atom"}
