Skip to content

Commit eb58dc1

Browse files
committed
Saving changes
1 parent 64db0d5 commit eb58dc1

File tree

6 files changed

+697
-698
lines changed

6 files changed

+697
-698
lines changed

src/funktion.ohm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Funktion {
22
Program = (GlobalRange "\n")? "\n"* ListOf<(Statement | FuncDef | ""), ("\n"+ | space+)>
33

4-
FuncDef = id "(" id ")" "=" "\n"? Expr (";" (FuncDef | Expr))*
4+
FuncDef = id "(" id ")" "=" "\n"? Expr (";" Expr)*
55
FuncCall = id "(" Expr ")"
66
Expr = CondExpr ("," "\n"? CondExpr)*
77
CondExpr = "?" CondExpr ("==" | "!=" | "<=" | "<" | ">=" | ">") CondExpr "=>" BitwiseExpr ":" "\n"? CondExpr --ternary

src/generator.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ export default function generate(program) {
9898
},
9999

100100
FuncDef(d) {
101-
console.log(d)
102101
const funcName = targetName(d.name);
103102
const param = targetName(d.param);
104103
const body = gen(d.body);

test/analyzer.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const semanticChecks = [
5252
["global range with negative integer time step", "`1..10` t-2t\n"],
5353
["global range with float time step", "`1..10` t2.5t\n"],
5454
["global range with character step", "`'a'..'z'`\n"],
55-
["function group", "f(x)=x\ng(x)=x\n{f(x)+g(x)}.step()"],
55+
// ["function group", "f(x)=x\ng(x)=x\n{f(x)+g(x)}.step()"],
5656
["input statement with prompt", 'f(x)=input("Hello")'],
5757
["using the function parameter", "f(x)=x*3+x"],
5858
["identifiers", "f(x)=x"],

0 commit comments

Comments
 (0)