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

Bad local declaration #63

Open
tigertv opened this issue Jan 9, 2021 · 1 comment
Open

Bad local declaration #63

tigertv opened this issue Jan 9, 2021 · 1 comment

Comments

@tigertv
Copy link

tigertv commented Jan 9, 2021

I get the error when use the following declaration:

int a = 5;

but the following code works without errors

int a;
a = 5;
@andrakis
Copy link

andrakis commented Jan 9, 2021

The parser is designed for simplicity and ease of understanding. It simply does not support declaring and assigning variables in the same line. I like to think that extending the capabilities is left up to the reader as a way of exploring the program.

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