typeToString static method
Implementation
static String typeToString(int type) {
if (type > 31) return "'${String.fromCharCode(type)}'";
switch (type) {
case EOF:
return 'EOF';
case NAME:
return 'name';
case NUMBER:
return 'number';
case BINARY:
return 'binary operator';
case ASSIGN:
return 'assignment operator';
case UPDATE:
return 'update operator';
case UNARY:
return 'unary operator';
case STRING:
return 'string literal';
default:
return '[type $type]';
}
}