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

in episode 5 'AND' keyword to be '&&'. #41

Open
ghost opened this issue Sep 5, 2023 · 2 comments
Open

in episode 5 'AND' keyword to be '&&'. #41

ghost opened this issue Sep 5, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 5, 2023

i want my 'AND' keyword to be '&&' but whenever I use && the code pops out it as illegal: '&' BTW the code works fine when I use 'AND' as an keyword. i also tried using '&&' still didn't work

@Sebwazhere
Copy link

This is half a year late and I'm assuming you probably moved on or figured it out but it's still open so on line 14 change LETTERS to string.ascii.letters + '&' and on line 120 change the keyword 'AND' to '&&'.

@foxypiratecove37350
Copy link

This is half a year late and I'm assuming you probably moved on or figured it out but it's still open so on line 14 change LETTERS to string.ascii.letters + '&' and on line 120 change the keyword 'AND' to '&&'.

I think it's not a good idea to directly change the LETTERS because it would allow for variable names such as a&a but I think it would be better to change the lexer to add a AND token and change the parser and the interpreter to use this new AND token instead of the Token(TT_KEYWORD, 'AND').

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