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

217 lines
5.5 KiB
Plaintext
Raw Permalink Normal View History

2024-01-25 12:10:45 +00:00
================================================================================
Simple Command
================================================================================
^ls
2024-01-25 12:10:45 +00:00
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(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
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(command
(command_text)))))
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(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
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(command
(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
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument)
(command_argument)
(command_argument)))))
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument))))))
================================================================================
Command Sequence with Arguments
================================================================================
^cargo run -- -c "output('hi there')"
^ls --long -a
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument)
(command_argument)
(command_argument)))))
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument))))))
================================================================================
Command Assignment
================================================================================
ls_output = ^ls --long -a;
cat_output = ^cat Cargo.toml;
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(assignment
(identifier)
(assignment_operator)
(statement
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument))))))))
(statement
(statement_kind
(assignment
(identifier)
(assignment_operator)
(statement
(statement_kind
(expression
(command
(command_text)
(command_argument)))))))))
================================================================================
Command with Semicolon
================================================================================
ls_output = ^ls --long -a; ls_output
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(assignment
(identifier)
(assignment_operator)
(statement
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument))))))))
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(identifier)))))
================================================================================
Command with Semicolon
================================================================================
ls_output = ^ls --long -a; ls_output
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(assignment
(identifier)
(assignment_operator)
(statement
(statement_kind
(expression
(command
(command_text)
(command_argument)
(command_argument))))))))
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(expression
(identifier)))))
================================================================================
Command with Quoted Semicolon
================================================================================
ls_output = ^echo ';'; ls_output
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(assignment
(identifier)
(assignment_operator)
(statement
(statement_kind
(expression
(command
(command_text)
(command_argument))))))))
(statement
(statement_kind
(expression
(identifier)))))