We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bb8277 commit 79d35e3Copy full SHA for 79d35e3
source/calcool/expression.d
@@ -26,6 +26,7 @@ private:
26
static foreach (i; trigonometry ~ other) {
27
funcs[i] = mixin("&" ~ i);
28
}
29
+ funcs["abs"] = &abs!real;
30
31
32
public:
source/calcool/parser.d
@@ -64,6 +64,10 @@ public:
64
Expression parseGroupExpression() {
65
auto inside = parseExpression(Precedence.START);
66
expect(TokenType.PR_CLOSE);
67
+ if (input.length > 0 && input.front().type == TokenType.PR_CLOSE) {
68
+ input.length = 0;
69
+ throw new ParseException("Syntax error");
70
+ }
71
return inside;
72
73
0 commit comments