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

Helloshiv01 patch 1 #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

helloshiv01
Copy link

error handling and error recovery

helloshiv01 and others added 2 commits March 5, 2023 06:13
Changes to the code
The use of isspace() function from ctype.h instead of checking for space and newline characters separately.
The use of a while loop instead of a do-while loop when scanning identifier names to avoid writing to the array out-of-bounds if the identifier name exceeds the maximum length.
The use of isdigit() function from ctype.h instead of checking if a character is a digit by comparing it to characters '0' to '9'.
The use of a switch statement to handle the different cases of characters that can be encountered in the input.
The lookahead() function has been simplified by returning the value returned by the lex() function directly.
LICENSE.md Outdated
Copy link
Owner

@zakirullin zakirullin Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed LICENSE.md ruins the build, accidental removal?

The rest is awesome! 👍

@helloshiv01
Copy link
Author

yes it was accidental i am really sorry

@zakirullin
Copy link
Owner

zakirullin commented Mar 20, 2023

yes it was accidental i am really sorry

It's okay, I haven't merged it yet. Can you please revert it back and I'll accept your PR as whole?

added license file which was deleted accidently.
@helloshiv01
Copy link
Author

done.

@zakirullin
Copy link
Owner

zakirullin commented Mar 21, 2023

I run the build (cmake -S . -B 'build' && cmake --build 'build') and got a few errors

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

Successfully merging this pull request may close these issues.

2 participants