Add a char type
This commit is contained in:
@@ -71,11 +71,15 @@ false {
|
||||
return yy::parser::make_IDENTIFIER(yytext, this->location);
|
||||
}
|
||||
[0-9]+ {
|
||||
return yy::parser::make_NUMBER(strtol(yytext, NULL, 10), this->location);
|
||||
return yy::parser::make_INTEGER(strtol(yytext, NULL, 10), this->location);
|
||||
}
|
||||
[0-9]+\.[0-9] {
|
||||
return yy::parser::make_FLOAT(strtof(yytext, NULL), this->location);
|
||||
}
|
||||
'[^']' {
|
||||
return yy::parser::make_CHARACTER(
|
||||
std::string(yytext, 1, strlen(yytext) - 2), this->location);
|
||||
}
|
||||
\( {
|
||||
return yy::parser::make_LEFT_PAREN(this->location);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user