diff --git a/Operand.cpp b/Operand.cpp index d2bd0b5..9b5c850 100644 --- a/Operand.cpp +++ b/Operand.cpp @@ -86,10 +86,21 @@ namespace jet { } else throw coreutils::Exception("Expecting ) at end of TRIM expression."); } else if(in.ifNextIgnoreCase("TOUPPER")) { - - + if(!in.ifNext("(")) + throw coreutils::Exception("Expecting ( for TOUPPER parameters."); + Operand parm1(in, tag); + if(in.ifNext(")")) { + string = parm1.string.toUpper(); + } else + throw coreutils::Exception("Expecting ) at end of TOUPPER expression."); } else if(in.ifNextIgnoreCase("TOLOWER")) { - + if(!in.ifNext("(")) + throw coreutils::Exception("Expecting ( for TOLOWER parameters."); + Operand parm1(in, tag); + if(in.ifNext(")")) { + string = parm1.string.toLower(); + } else + throw coreutils::Exception("Expecting ) at end of TOLOWER expression."); } else if(in.ifNextIgnoreCase("REVERSE")) { } else if(in.ifNextIgnoreCase("CONCAT")) { diff --git a/tests/testvar.jet b/tests/testvar.jet index 89c02b4..b10195f 100755 --- a/tests/testvar.jet +++ b/tests/testvar.jet @@ -21,4 +21,7 @@ $[ix] $[ix] $[test64;tobase64] +$[test64;toupper] + +$[testupperexpr]