/**
   * Get the next token in the stream
   *
   * @param {Stream} stream
   * @param {State} state
   */

/**
   * Safely copy a state
   *
   * @return {State}
   */

/***/

// (Less wasteful than consing up a hundred closures on every call.)

// (comments) in between. Fallback is to only notice when we hit the

// Attributes Mode

// Class expressions may have an optional name.

// Closing tag spotted

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

// Combinator utils

// Combinators

// CommonJS

// Communicate our context to the combinators.

// Context management

// Dedent relative to current context.

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

// FIXME function decls are also not block scoped

// Fall through means this is global

// Indent multi-line strings (e.g. css).

// Indent the starts of attribute names.

// Indented Mode

// Interface

// Kludge to prevent 'maybelse' from blocking lexical scope pops

// Must be '('

// Opening tag spotted

// Parser

// Resume indentation from parent context.

// Return variables for tokenizers

// SVG-specific

// This is a crude lookahead trick to try and notice that we're

// Tokenizers

// Try to skip TypeScript return type declarations after the arguments

// Used as scratch variables to communicate multiple values without

// Work around fat-arrow-detection complication for detecting typescript typed arrow params

// actually hit the arrow token. It only works if the arrow is on

// arrow, and not declare the arguments as locals for the arrow

// body.

// consing up tons of objects.

// html string

// if javaScriptLine was set at end of line, ignore it

// if restOfLine was set at end of line, ignore it

// parsing the argument patterns for a fat-arrow function before we

// the same line as the arguments and there's no strange noise

// token types

//not the end of an attribute
