mirror of
https://github.com/tufanbarisyildirim/gonginx.git
synced 2026-04-27 00:35:51 +03:00
[GH-ISSUE #1] parser.parseStatement does not follow grammar for parsing parameters #3
Labels
No labels
bug
enhancement
good first issue
pull-request
question
v2
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gonginx#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bonnyr on GitHub (May 6, 2020).
Original GitHub issue: https://github.com/tufanbarisyildirim/gonginx/issues/1
The grammar outlined in the documentation suggests that parsing directives follows these rules:
This is implemented in parseStatement and the code iterates over tokens and checks for quoted string or keyword tokens, but not for variables even though the
keywordproduction above clearly indicates Variables are allowed.This can be easily checked by trying to parse the following fragment:
In this case the parameters are variables and cause panic during parse
@tufanbarisyildirim commented on GitHub (May 6, 2020):
Thanks for reporting @bonnyr
Confirmed that it does not accept variables as directive parameter.
I would be happy to review and merge if you have a solution for it. I will also fix when I have time if you don't.