More work on the operand.
This commit is contained in:
1 parent
bd25efc461
commit
03fe14d075
3 files changed
+17
-29
No files matched your search
+14
-27
@@ -1,5 +1,6 @@
|
||||
#include "Operand.h"
|
||||
#include "Exception.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace jet {
|
||||
|
||||
@@ -14,7 +15,7 @@ namespace jet {
|
||||
if(!in.ifNext(","))
|
||||
throw coreutils::Exception("Expecting , in SUBSTRING expression.");
|
||||
Operand parm2(in);
|
||||
if(in.ifNext(")")) {
|
||||
if(in.ifNext(")")) {
|
||||
string = parm1.string.substring(parm2.string.asInteger());
|
||||
}
|
||||
else if(!in.ifNext(","))
|
||||
@@ -25,9 +26,7 @@ namespace jet {
|
||||
}
|
||||
else
|
||||
throw coreutils::Exception("Expecting ) at end of substring expression.");
|
||||
}
|
||||
|
||||
else if(in.ifNext("LEFT")) {
|
||||
} else if(in.ifNext("LEFT")) {
|
||||
|
||||
} else if(in.ifNext("RIGHT")) {
|
||||
|
||||
@@ -41,37 +40,25 @@ namespace jet {
|
||||
|
||||
} else if(in.ifNext("CONCAT")) {
|
||||
|
||||
}
|
||||
|
||||
if(in.ifNext("true")) {
|
||||
} else if(in.ifNext("true")) {
|
||||
boolean = true;
|
||||
string = "true";
|
||||
return;
|
||||
}
|
||||
if(in.ifNext("false")) {
|
||||
} else if(in.ifNext("false")) {
|
||||
boolean = false;
|
||||
string = "false";
|
||||
return;
|
||||
} else if(in.startsWithDouble()) {
|
||||
char *temp = in.getCursor();
|
||||
doubleValue = in.asDouble();
|
||||
string = coreutils::ZString(temp, in.getCursor() - temp);
|
||||
return;
|
||||
} else if(in.ifNext("'")) {
|
||||
string = in.getTokenExclude("'");
|
||||
in.ifNext("'");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if(in.ifNext("+")) {
|
||||
}
|
||||
if(in.ifNext("-")) {
|
||||
}
|
||||
if(in.getTokenInclude("0123456789")) {
|
||||
}
|
||||
if(in.ifNext(".")) {
|
||||
}
|
||||
if(in.getTokenInclude("0123456789")) {
|
||||
}
|
||||
|
||||
if(in.ifNext("\"")) {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user