Skip to content
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

Variable of two keywords got splited during parsing #53

Open
PauliusKu opened this issue Aug 28, 2024 · 2 comments
Open

Variable of two keywords got splited during parsing #53

PauliusKu opened this issue Aug 28, 2024 · 2 comments

Comments

@PauliusKu
Copy link

Variable outputStream in VAR statement was recognized as identifier, but later parsed as two separate keywords, which brings up error and rest of the file is not being formatted.

Example:

method public void WriteJson(filePath as char, inputJson as Object):
    var JsonSerializer jsonSerializer = new JsonSerializer(true).
    var FileOutputStream outputStream = new FileOutputStream(filePath).

    jsonSerializer:Serialize(inputJson, outputStream).
    outputStream:Close().
end method.

image
image
image
image

Same happened with inputTable. And then after this it even thought that "def" in word "default" is DEFINE. Example:
This:

if inputTable:default-buffer-handle:available = false then
      undo, throw new AppException(ErrorCode:RECORD_NOT_FOUND, inputTable:name).
@PauliusKu
Copy link
Author

Similarly, there are issues with variable names containing other keywords like for, def and probably more.

image

@jkbz64
Copy link
Member

jkbz64 commented Aug 31, 2024

I didn't know such syntax existed, looks like 12.8 thing, this should resolve with #52.

Similarly, there are issues with variable names containing other keywords like for, def and probably more.

Well.. it's a known issue... I've bumped into it myself too and don't really know how to properly fix that yet...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants