Skip to content

Fix: Unterminated function's body statements #76

Fix: Unterminated function's body statements

Fix: Unterminated function's body statements #76

Triggered via pull request May 18, 2024 08:25
Status Failure
Total duration 21s
Artifacts

test-pr.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors
tests/parser.test.ts > Parser > should parse function declaration with parameters and block statement: tests/parser.test.ts#L70
AssertionError: expected { kind: 'Program', body: [ { …(4) } ] } to deeply equal { kind: 'Program', body: [ { …(4) } ] } - Expected + Received Object { "body": Array [ Object { "body": Array [ Object { "kind": "ReturnExpr", "value": Object { "kind": "BinaryExpr", "left": Object { "kind": "Identifier", "symbol": "a", }, "operator": "+", "right": Object { "kind": "Identifier", "symbol": "b", }, }, }, + Object { + "kind": "FunctionTerminator", + }, ], "kind": "FunctionDeclaration", "name": "add", "parameters": Array [ "a", "b", ], }, ], "kind": "Program", } ❯ tests/parser.test.ts:70:17
test
Process completed with exit code 1.