-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from kit494way/fix-parsing-comment
Fix parsing of comment
- Loading branch information
Showing
4 changed files
with
272 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
===== | ||
comment-001-single | ||
===== | ||
|
||
# comment | ||
|
||
----- | ||
|
||
(nu_script | ||
(comment)) | ||
|
||
===== | ||
comment-002-before-command | ||
===== | ||
|
||
# comment | ||
echo hello | ||
|
||
----- | ||
|
||
(nu_script | ||
(comment) | ||
(pipeline | ||
(pipe_element | ||
(command | ||
(cmd_identifier) | ||
(val_string))))) | ||
|
||
===== | ||
comment-003-empty-before-command | ||
===== | ||
|
||
# | ||
echo hello | ||
|
||
----- | ||
|
||
(nu_script | ||
(comment) | ||
(pipeline | ||
(pipe_element | ||
(command | ||
(cmd_identifier) | ||
(val_string))))) | ||
|
||
===== | ||
comment-003-end-of-line | ||
===== | ||
|
||
echo hello # comment | ||
|
||
----- | ||
|
||
(nu_script | ||
(pipeline | ||
(pipe_element | ||
(command | ||
(cmd_identifier) | ||
(val_string))) | ||
(comment))) | ||
|
||
===== | ||
comment-003-empty-end-of-line | ||
===== | ||
|
||
echo hello # | ||
|
||
----- | ||
|
||
(nu_script | ||
(pipeline | ||
(pipe_element | ||
(command | ||
(cmd_identifier) | ||
(val_string))) | ||
(comment))) | ||
|
||
===== | ||
comment-003-empty-end-of-line-before-command | ||
===== | ||
|
||
echo hello # | ||
echo world | ||
|
||
----- | ||
|
||
(nu_script | ||
(pipeline | ||
(pipe_element | ||
(command | ||
(cmd_identifier) | ||
(val_string))) | ||
(comment)) | ||
(pipeline | ||
(pipe_element | ||
(command | ||
(cmd_identifier) | ||
(val_string))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7049,7 +7049,7 @@ | |
}, | ||
{ | ||
"type": "PATTERN", | ||
"value": ".*\\n" | ||
"value": ".*" | ||
} | ||
] | ||
} | ||
|
Oops, something went wrong.