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

Go through parser and make sure it deals better with invalid code #98

Open
uliwitness opened this issue Mar 30, 2019 · 0 comments
Open
Labels
good first issue Issues that are clearly defined and don't require a deep understanding of Stacksmith internals. interpreter Hammer programming language: Parser, tokenizer, interpreter.

Comments

@uliwitness
Copy link
Owner

Now that we actually run our parser over the script for formatting, make sure that the parse tree when errors happen is always left in a state that calling GenerateCode() on it doesn't crash.

I've fixed a bunch of cases where a command used to be able to just assume it had 2 arguments by the time GenerateCode was called, but now with runtime-deferred errors and the formatter walking the parse tree, we need to add extra NULL checks and extra error checks before so we are not dumb and set an argument to NULL.

@uliwitness uliwitness added interpreter Hammer programming language: Parser, tokenizer, interpreter. good first issue Issues that are clearly defined and don't require a deep understanding of Stacksmith internals. labels Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are clearly defined and don't require a deep understanding of Stacksmith internals. interpreter Hammer programming language: Parser, tokenizer, interpreter.
Projects
None yet
Development

No branches or pull requests

1 participant