Introduce float type

This commit is contained in:
2024-12-31 18:10:34 +01:00
parent 75a691134f
commit 8176da5f9b
8 changed files with 100 additions and 60 deletions

View File

@@ -73,6 +73,9 @@ false {
[0-9]+ {
return yy::parser::make_NUMBER(strtol(yytext, NULL, 10), this->location);
}
[0-9]+\.[0-9] {
return yy::parser::make_FLOAT(strtof(yytext, NULL), this->location);
}
\( {
return yy::parser::make_LEFT_PAREN(this->location);
}