message: Modify lexer modes edge case check to support transitions.
diff: @@ -470,7 +470,6 @@ export class Lexer {
  imageLength,
  group,
  tokType,
  - bamba,
  newToken,
  errLength,
  droppedChar,
  @@ -501,7 +500,12 @@ export class Lexer {
  let modeStack = []
  let pop_mode = popToken => {
  // TODO: perhaps avoid this error in the edge case there is no more input?
  - if (modeStack.length === 1) {
  + if (
  + modeStack.length === 1 &&
  + // if we have both a POP_MODE and a PUSH_MODE this is in-fact a "transition"
  + // So no error should occur.
  + popToken.PUSH_MODE === undefined
  + ) {
  // if we try to pop the last mode there lexer will no longer have ANY mode.
  // thus the pop is ignored, an error will be created and the lexer will continue parsing in the previous mode.
  let msg = `Unable to pop Lexer Mode after encountering Token ->${popToken.image}<- The Mode Stack is empty`
  