1
0
dust/tree-sitter-dust/corpus/commands.txt

196 lines
4.8 KiB
Plaintext
Raw Normal View History

2024-01-25 12:10:45 +00:00
================================================================================
Simple Command
================================================================================
^ls
2024-01-25 12:10:45 +00:00
--------------------------------------------------------------------------------
(root
(statement
(expression
2024-01-26 20:23:24 +00:00
(command
(command_text)))))
2024-01-25 12:10:45 +00:00
================================================================================
Command Sequence
2024-01-25 12:10:45 +00:00
================================================================================
^less ^ls
2024-01-25 12:10:45 +00:00
--------------------------------------------------------------------------------
(root
(statement
(expression
2024-01-26 20:23:24 +00:00
(command
(command_text))))
(statement
(expression
2024-01-26 20:23:24 +00:00
(command
(command_text)))))
2024-01-25 12:10:45 +00:00
================================================================================
Command with Arguments
================================================================================
^ls --long -a
2024-01-25 12:10:45 +00:00
--------------------------------------------------------------------------------
(root
(statement
(expression
(command
2024-01-26 20:23:24 +00:00
(command_text)
(command_argument)
(command_argument)))))
2024-01-25 12:10:45 +00:00
================================================================================
Command Sequence with Arguments
2024-01-25 12:10:45 +00:00
================================================================================
^cargo run -- -c "output('hi there')"
^ls --long -a
2024-01-25 12:10:45 +00:00
--------------------------------------------------------------------------------
(root
(statement
(expression
(command
2024-01-26 20:23:24 +00:00
(command_text)
(command_argument)
(command_argument)
(command_argument)
(command_argument))))
(statement
(expression
(command
2024-01-26 20:23:24 +00:00
(command_text)
(command_argument)
(command_argument)))))
================================================================================
Command Sequence with Arguments
================================================================================
^cargo run -- -c "output('hi there')"
^ls --long -a
--------------------------------------------------------------------------------
(root
(statement
(expression
(command
(command_text)
(command_argument)
(command_argument)
(command_argument)
(command_argument))))
(statement
(expression
(command
(command_text)
(command_argument)
(command_argument)))))
================================================================================
Command Assignment
================================================================================
ls_output = ^ls --long -a;
cat_output = ^cat Cargo.toml;
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(command
(command_text)
(command_argument)
(command_argument))))))
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(command
(command_text)
(command_argument)))))))
================================================================================
Command with Semicolon
================================================================================
ls_output = ^ls --long -a; ls_output
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(command
(command_text)
(command_argument)
(command_argument))))))
(statement
(expression
(identifier))))
================================================================================
Command with Semicolon
================================================================================
ls_output = ^ls --long -a; ls_output
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(command
(command_text)
(command_argument)
(command_argument))))))
(statement
(expression
(identifier))))
================================================================================
Command with Quoted Semicolon
================================================================================
ls_output = ^echo ';'; ls_output
--------------------------------------------------------------------------------
(root
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(command
(command_text)
(command_argument))))))
(statement
(expression
(identifier))))