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

> ${var} breaks the parser. #17

Closed
tufanbarisyildirim opened this issue May 1, 2023 · 2 comments
Closed

> ${var} breaks the parser. #17

tufanbarisyildirim opened this issue May 1, 2023 · 2 comments
Assignees

Comments

@tufanbarisyildirim
Copy link
Owner

Looks like ${var} can break the parser.

         > Hi @pksml85 can I have your example config file to improve [gonginx](https://github.com/tufanbarisyildirim/gonginx)?

Hi @tufanbarisyildirim. Sorry for the delay... but here is the example. GoNginx destroys my location blocks.

Here is my original config code and here is the mangled code from GoNginx

Originally posted by @pksml85 in 0xJacky/nginx-ui#73 (comment)

@tufanbarisyildirim tufanbarisyildirim self-assigned this May 1, 2023
@tufanbarisyildirim
Copy link
Owner Author

tufanbarisyildirim commented May 4, 2023

I think a good plan could be something like;

  • Separate keywords & vars during the lexing instead of scanning all in 1 keyword
  • Define a Parameter (at same level with Directive) statement in parser and encapsulate all tokens that creates the parameter.

@tufanbarisyildirim
Copy link
Owner Author

I think a good plan could be something like;

  • Separate keywords & vars during the lexing instead of scanning all in 1 keyword
  • Define a Parameter (at same level with Directive) statement in parser and encapsulate all tokens that creates the parameter.

instead, changed the way we read a keyword, now token.Variable is useless and we need another PR to clean it up.

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

1 participant