tokenString static method

String tokenString(
  1. WKTToken token
)

Gets a description of the current token type @param tokenizer the tokenizer @return a description of the current token

Implementation

static String tokenString(WKTToken token) {
  switch (token.type) {
    case WKTTokenType.NUMERIC_LITERAL:
      return "<NUMBER>";
//      case WKTTokenType.TT_EOL: // TODO check
//        return "End-of-Line";
    case WKTTokenType.EOS:
      return "End-of-Stream";
    case WKTTokenType.KEYWORD:
      return "'${token.value}'";
  }
  return "'${token.type}'";
}