lib/core.js
function endOfMode(mode, lexeme) {
    if (test(mode.endRe, lexeme)) {
      while (mode.endsParent && mode.parent) {
        mode = mode.parent
      }

      return mode
    }

    if (mode.endsWithParent) {
      return endOfMode(mode.parent, lexeme)
    }
  }
function endOfMode(mode, lexeme) {
    if (test(mode.endRe, lexeme)) {
      while (mode.endsParent && mode.parent) {
        mode = mode.parent
      }

      return mode
    }

    if (mode.endsWithParent) {
      return endOfMode(mode.parent, lexeme)
    }
  }
function endOfMode ( mode , lexeme ) { if ( test ( mode . endRe , lexeme ) ) { while ( mode . endsParent && mode . parent ) { mode = mode . parent } return mode } if ( mode . endsWithParent ) { return endOfMode ( mode . parent , lexeme ) } }
Check if `lexeme` ends `mode`.
Check if lexeme ends mode .