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

162 lines
4.1 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 Assignment
================================================================================
2024-02-18 16:38:35 +00:00
ls_output = ^ls;
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
2024-02-18 16:38:35 +00:00
(command_text))))))))
2024-02-16 15:55:15 +00:00
(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 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)))))