Skip to content

Commit

Permalink
add SQL-style comment syntax (#5381)
Browse files Browse the repository at this point in the history
  • Loading branch information
mccanne authored Oct 28, 2024
1 parent fa27b71 commit 96546f5
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 35 deletions.
105 changes: 70 additions & 35 deletions compiler/parser/parser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compiler/parser/parser.peg
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,7 @@ MultiLineComment

SingleLineComment
= "//" (!LineTerminator SourceCharacter)*
/ "--" (!LineTerminator SourceCharacter)*

EOL = WhiteSpace* LineTerminator

Expand Down
16 changes: 16 additions & 0 deletions compiler/parser/ztests/sql-comments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
script: |
echo null | super -z -I yield.spq -
inputs:
- name: yield.spq
data: |
yield 1
| yield this, 2, 3 -- , 4
-- | yield 5
outputs:
- name: stdout
data: |
1
2
3

0 comments on commit 96546f5

Please sign in to comment.