This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial tests, some grammar fixes * Mark generated files as binary
- Loading branch information
Showing
8 changed files
with
23,953 additions
and
24,395 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,3 @@ | ||
*.c binary | ||
src/node-types.json binary | ||
src/grammar.json binary |
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,123 @@ | ||
=== | ||
Plain cmdlet | ||
=== | ||
|
||
Write-Something | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string)))) | ||
|
||
=== | ||
Native command | ||
=== | ||
|
||
net.exe | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string)))) | ||
|
||
=== | ||
Cmdlet with arguments | ||
=== | ||
|
||
Write-Output 'Hi' | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(single_quote_string))))) | ||
|
||
=== | ||
Cmdlet with parameters | ||
=== | ||
|
||
Write-Output -InputObject 'Hi' | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_parameter) | ||
(command_argument | ||
(single_quote_string))))) | ||
|
||
=== | ||
Cmdlet with multiple arguments and parameters | ||
=== | ||
|
||
Invoke-Thing $argument1 -Parameter 'Thing' | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(variable | ||
(simple_variable))) | ||
(command_parameter) | ||
(command_argument | ||
(single_quote_string))))) | ||
|
||
=== | ||
Unix-like native command | ||
=== | ||
|
||
git clone -b this_branch --single-branch https://github.com/PowerShell/PowerShell | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(bareword_string)) | ||
(command_parameter) | ||
(command_argument | ||
(bareword_string)) | ||
(command_parameter) | ||
(command_argument | ||
(bareword_string))))) | ||
|
||
=== | ||
Windows-style native command | ||
=== | ||
|
||
net use e: \\usrsvr002\smithmark Ue345Ii /user:pdc01\msmith2 /savecred /p:yes | ||
|
||
--- | ||
|
||
(program | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(bareword_string)) | ||
(command_argument | ||
(bareword_string)) | ||
(command_argument | ||
(bareword_string)) | ||
(command_argument | ||
(bareword_string)) | ||
(command_argument | ||
(bareword_string)) | ||
(command_argument | ||
(bareword_string)) | ||
(command_argument | ||
(bareword_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
=== | ||
Single inline commant | ||
=== | ||
|
||
$x = 3 | ||
|
||
# This is a comment | ||
|
||
Get-ChildItem . | ||
|
||
--- | ||
|
||
(program | ||
(assignment_statement | ||
(variable | ||
(simple_variable)) | ||
(pipeline_statement | ||
(number_expr))) | ||
(comment) | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(bareword_string))))) | ||
|
||
=== | ||
Single line block comment | ||
=== | ||
|
||
$x = 3 | ||
|
||
<# Block comment #> | ||
|
||
Get-ChildItem . | ||
|
||
--- | ||
|
||
(program | ||
(assignment_statement | ||
(variable | ||
(simple_variable)) | ||
(pipeline_statement | ||
(number_expr))) | ||
(comment) | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(bareword_string))))) | ||
|
||
=== | ||
Multi-line block comment | ||
=== | ||
|
||
$x = 3 | ||
|
||
<# | ||
|
||
Here | ||
|
||
is a | ||
|
||
longer | ||
|
||
comment #> | ||
|
||
Get-ChildItem . | ||
|
||
--- | ||
|
||
(program | ||
(assignment_statement | ||
(variable | ||
(simple_variable)) | ||
(pipeline_statement | ||
(number_expr))) | ||
(comment) | ||
(pipeline_statement | ||
(command_expression | ||
(bareword_string) | ||
(command_argument | ||
(bareword_string))))) | ||
|
||
=== | ||
Pathological block comment #1 | ||
=== | ||
|
||
<##> | ||
|
||
--- | ||
|
||
(program | ||
(comment)) | ||
|
||
=== | ||
Pathological block comment #2 | ||
=== | ||
|
||
<###> | ||
|
||
--- | ||
|
||
(program | ||
(comment)) |
Oops, something went wrong.