-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed using function as argument in lox interpreter #5
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tkueeu, thanks for looking into the issue 👍
src/interpreter/runner.ts
Outdated
return functionValue; | ||
return functionValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Remove Whitespace
@@ -3,7 +3,7 @@ import { BinaryExpression, Expression, isBinaryExpression, isBooleanExpression, | |||
import { createLoxServices } from "../language-server/lox-module"; | |||
import { v4 } from 'uuid'; | |||
import { URI } from "vscode-uri"; | |||
import { CancellationToken } from "vscode-languageclient"; | |||
import { CancellationToken } from 'vscode-jsonrpc'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was necessary to import less from vscode, otherwise the full initialization breaks unit test
|
||
test('Closure 1', async() => { | ||
const input = ` | ||
// So far fails with: No variable 'outside' defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe failing tests should be commented out and marked with a TODO or FIXME comment?
` | ||
|
||
const ast = await parse(input); | ||
ast.parseResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet a complete test ...
This should fix issue #4