Made Operand ignore case for function names.
This commit is contained in:
1 parent
ed00a330a4
commit
b46694f71b
2 files changed
+14
-14
No files matched your search
+13
-13
@@ -20,7 +20,7 @@ namespace jet {
|
||||
throw coreutils::Exception("expected ) in expression.");
|
||||
}
|
||||
|
||||
if(in.ifNext("SUBSTRING")) {
|
||||
if(in.ifNextIgnoreCase("SUBSTRING")) {
|
||||
if(!in.ifNext("("))
|
||||
throw coreutils::Exception("Expecting ( for SUBSTRING parameters.");
|
||||
Operand parm1(in);
|
||||
@@ -38,7 +38,7 @@ namespace jet {
|
||||
}
|
||||
else
|
||||
throw coreutils::Exception("Expecting ) at end of substring expression.");
|
||||
} else if(in.ifNext("LEFT")) {
|
||||
} else if(in.ifNextIgnoreCase("LEFT")) {
|
||||
if(!in.ifNext("("))
|
||||
throw coreutils::Exception("Expecting ( for LEFT parameters.");
|
||||
Operand parm1(in);
|
||||
@@ -50,32 +50,32 @@ namespace jet {
|
||||
}
|
||||
else
|
||||
throw coreutils::Exception("Expecting ) at end of LEFT expression.");
|
||||
} else if(in.ifNext("RIGHT")) {
|
||||
} else if(in.ifNextIgnoreCase("RIGHT")) {
|
||||
|
||||
} else if(in.ifNext("TRIM")) {
|
||||
} else if(in.ifNextIgnoreCase("TRIM")) {
|
||||
|
||||
} else if(in.ifNext("TOUPPER")) {
|
||||
} else if(in.ifNextIgnoreCase("TOUPPER")) {
|
||||
|
||||
} else if(in.ifNext("TOLOWER")) {
|
||||
} else if(in.ifNextIgnoreCase("TOLOWER")) {
|
||||
|
||||
} else if(in.ifNext("REVERSE")) {
|
||||
} else if(in.ifNextIgnoreCase("REVERSE")) {
|
||||
|
||||
} else if(in.ifNext("CONCAT")) {
|
||||
} else if(in.ifNextIgnoreCase("CONCAT")) {
|
||||
|
||||
} else if(in.ifNext("INTEGER")) {
|
||||
} else if(in.ifNextIgnoreCase("INTEGER")) {
|
||||
|
||||
} else if(in.ifNext("ROUND")) {
|
||||
} else if(in.ifNextIgnoreCase("ROUND")) {
|
||||
|
||||
} else if(in.ifNext("RANDOM")) {
|
||||
} else if(in.ifNextIgnoreCase("RANDOM")) {
|
||||
unsigned int seed = (unsigned int)clock();
|
||||
doubleValue = (double) rand_r(&seed) / (RAND_MAX + 1.0);
|
||||
isNumber = true;
|
||||
string = std::format("{:.12f}", doubleValue);
|
||||
string.removeTrailingZeros();
|
||||
} else if(in.ifNext("true")) {
|
||||
} else if(in.ifNextIgnoreCase("true")) {
|
||||
boolean = true;
|
||||
string = "true";
|
||||
} else if(in.ifNext("false")) {
|
||||
} else if(in.ifNextIgnoreCase("false")) {
|
||||
boolean = false;
|
||||
string = "false";
|
||||
} else if(in.startsWithNumber()) {
|
||||
|
||||
Reference in new issue
Block a user