tree-sitter-bash/corpus/programs.txt

97 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2017-07-14 21:34:49 +00:00
===============================
Comments
===============================
#!/bin/bash
# hi
---
(program
(comment)
(comment))
2017-07-14 21:39:28 +00:00
===============================
Escaped newlines
===============================
abc \
d \
e
f=g \
h=i \
j \
--k
---
(program
2017-07-14 23:11:35 +00:00
(command
(command_name (word))
2017-07-16 05:13:55 +00:00
(word)
(word))
2017-07-14 23:11:35 +00:00
(command
(variable_assignment
2017-07-14 21:39:28 +00:00
(variable_name)
2017-07-16 05:13:55 +00:00
(word))
(variable_assignment
2017-07-14 21:39:28 +00:00
(variable_name)
2017-07-16 05:13:55 +00:00
(word))
(command_name (word))
2017-07-16 05:13:55 +00:00
(word)))
=============================
escaped newline immediately after a char
=============================
echo a \
b
echo a\
b
echo a\
b\
c
-----------------------------
(program
(command
(command_name
(word))
(word)
(word))
(command
(command_name
(word))
(word)
(word))
(command
(command_name
(word))
(word)
(word)
(word)))
=============================
Escaped whitespace
============================
echo 1 \ 2 \ 3
---
(program (command (command_name (word)) (word) (word) (word)))
====================================
Files without trailing terminators
====================================
echo hi
---
(program (command (command_name (word)) (word)))