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

Whitespace required around != operator #1084

Open
jszwedko opened this issue Oct 22, 2024 · 0 comments
Open

Whitespace required around != operator #1084

jszwedko opened this issue Oct 22, 2024 · 0 comments
Labels
type: bug A code related bug vrl: parser Changes to the syntax parser

Comments

@jszwedko
Copy link
Member

The following:

 .ddtags.kube_namespace=="kong" &&  .message!="[notice] 2383#0:4 [lua] init.lua:272:"

Gives the error:


error[E203]: syntax error
  ┌─ :1:38
  │
1 │  .ddtags.kube_namespace=="kong" &&  .message!="[notice] 2383#0:4 [lua] init.lua:272:"
  │                                      ^^^^^^^
  │                                      │
  │                                      unexpected syntax token: "FunctionCall"
  │                                      expected one of: ".", "[", "abort", "identifier", "path field", "return", "string literal", RQuery
  │
  = see language documentation at https://vrl.dev
  = try your code in the VRL REPL, learn more at https://vrl.dev/examples

Adding whitespace around the != seems to fix it:

 .ddtags.kube_namespace=="kong" &&  .message != "[notice] 2383#0:4 [lua] init.lua:272:"
@jszwedko jszwedko added type: bug A code related bug vrl: parser Changes to the syntax parser labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug vrl: parser Changes to the syntax parser
Projects
None yet
Development

No branches or pull requests

1 participant