We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug If the last directive is not terminated by a semicolon ( ; ), then lex drops the last token.
To Reproduce Steps to reproduce the behavior:
crossplane lex
Output:
["user","www","www",";","worker_processes"]
Expected behavior I expect to see the "2" token.
Your environment
Additional context If I drop the last "2" from the config file, the output becomes:
["user","www","www",";"]
I interpreted this behavior as the lexer always dropping the last token if the last directive is not terminated with a semicolon.
Going down stream to parse: When I feed the above faulty configuration file to parse, here is what I got:
parse
$ crossplane parse samples/faulty.conf | jq . [nginx-conf-tool:add-tree:] { "status": "failed", "errors": [ { "file": "samples/faulty.conf", "error": "", "line": null } ], "config": [ { "file": "samples/faulty.conf", "status": "failed", "errors": [ { "error": "", "line": null } ], "parsed": [] } ] }
Notice the empty error. I expect to see better error messages. I also expect to see line number where the error happened.
error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
If the last directive is not terminated by a semicolon ( ; ), then lex drops the last token.
To Reproduce
Steps to reproduce the behavior:
crossplane lex
on nginx configOutput:
Expected behavior
I expect to see the "2" token.
Your environment
Additional context
If I drop the last "2" from the config file, the output becomes:
I interpreted this behavior as the lexer always dropping the last token if the last directive is not terminated with a semicolon.
Going down stream to
parse
: When I feed the above faulty configuration file to parse, here is what I got:Notice the empty
error
. I expect to see better error messages. I also expect to see line number where the error happened.The text was updated successfully, but these errors were encountered: