Fix int stuff
This commit is contained in:
parent
73939b3668
commit
96f93ceb49
|
@ -124,17 +124,15 @@ void Parser::processLines() {
|
|||
else {
|
||||
token.keyword = keywords::VALUE;
|
||||
// Convert the value based on its type
|
||||
if (canDec(ct)) {
|
||||
token.type = valtype::DEC;
|
||||
token.value.type = valtype::DEC;
|
||||
token.value.value = stod(ct);
|
||||
}
|
||||
else if (canInt(ct)) {
|
||||
if (canInt(ct)) {
|
||||
token.type = valtype::INT;
|
||||
token.value.type = valtype::INT;
|
||||
token.value.value = stoi(ct);
|
||||
}
|
||||
else if (ct == "true" || ct == "false") {
|
||||
}else if (canDec(ct)) {
|
||||
token.type = valtype::DEC;
|
||||
token.value.type = valtype::DEC;
|
||||
token.value.value = stod(ct);
|
||||
} else if (ct == "true" || ct == "false") {
|
||||
token.type = valtype::BOOL;
|
||||
token.value.type = valtype::BOOL;
|
||||
token.value.value = (ct == "true");
|
||||
|
|
Loading…
Reference in New Issue
Block a user