Add modulus operator to parser

This commit is contained in:
Jonathan Turner
2009-07-04 02:17:50 +00:00
parent 310dd030ac
commit b2a99d4105
2 changed files with 3 additions and 3 deletions

View File

@@ -1132,12 +1132,12 @@ namespace chaiscript
if (Dot_Access()) {
retval = true;
if (Symbol("*", true) || Symbol("/", true)) {
if (Symbol("*", true) || Symbol("/", true) || Symbol("%", true)) {
do {
if (!Dot_Access()) {
throw Parse_Error("Incomplete math expression", File_Position(line, col), filename);
}
} while (retval && (Symbol("*", true) || Symbol("/", true)));
} while (retval && (Symbol("*", true) || Symbol("/", true) || Symbol("%", true)));
build_match(Token_Type::Multiplicative, prev_stack_top);
}