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

Like #760

Merged
merged 5 commits into from
Nov 25, 2022
Merged

Like #760

merged 5 commits into from
Nov 25, 2022

Conversation

tobymao
Copy link
Owner

@tobymao tobymao commented Nov 25, 2022

@yuchaofan13
Copy link
Contributor

yuchaofan13 commented Nov 25, 2022

@tobymao
Thanks for fixing my code- I thought modifying _parse_create() was the only option and didn't realise TokenType.LIKE could have different parsing functions across RANGE_PARSERS, PROPERTY_PARSERS and CONSTRAINT_PARSERS.

Do you have any idea as to why my original code wasn't working?

@tobymao
Copy link
Owner Author

tobymao commented Nov 25, 2022

yea, there were many problems. most of the code you added wasn’t even being called

@yuchaofan13
Copy link
Contributor

yea, there were many problems. most of the code you added wasn’t even being called

yeah parse_one gave the desired output but I guess things weren't working properly under the hood. Do you have any advice/SOP for making code changes like this? I'm gradually developing a better understanding of the overall codebase but still relying a lot on copying similar code or messily modifying existing code.

@tobymao
Copy link
Owner Author

tobymao commented Nov 25, 2022

you need to really understand what is getting called and what's happening. parsers are in general quite complex because they are very recursive, tracing through the stack and seeing how things work internally will give you a better understanding of what's going on.

@yuchaofan13
Copy link
Contributor

you need to really understand what is getting called and what's happening. parsers are in general quite complex because they are very recursive, tracing through the stack and seeing how things work internally will give you a better understanding of what's going on.

Gotcha, thanks for the advice. Which key modules would you recommend first trying to understand?

@tobymao
Copy link
Owner Author

tobymao commented Nov 25, 2022

the parser and generator

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