fromString static method
Implementation
static LexemeType fromString(String str) {
switch (str) {
case QueryLexer.EOS:
return LexemeType.EOS;
case QueryLexer.FIELD:
return LexemeType.FIELD;
case QueryLexer.TERM:
return LexemeType.TERM;
case QueryLexer.EDIT_DISTANCE:
return LexemeType.EDIT_DISTANCE;
case QueryLexer.BOOST:
return LexemeType.BOOST;
case QueryLexer.PRESENCE:
return LexemeType.PRESENCE;
default:
throw Exception('Invalid LexemType $str');
}
}