textbringer-tree-sitter 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CLAUDE.md +8 -0
- data/lib/textbringer/tree_sitter/node_maps/ruby.rb +4 -79
- data/lib/textbringer/tree_sitter/node_maps/sql.rb +14 -21
- data/lib/textbringer/tree_sitter/version.rb +1 -1
- data/lib/textbringer/tree_sitter_adapter.rb +7 -5
- data/samples/Sample.java +289 -0
- data/samples/sample.c +176 -0
- data/samples/sample.cob +174 -0
- data/samples/sample.cr +321 -0
- data/samples/sample.cs +273 -0
- data/samples/sample.ex +307 -0
- data/samples/sample.groovy +258 -0
- data/samples/sample.haml +154 -0
- data/samples/sample.html +168 -0
- data/samples/sample.js +266 -0
- data/samples/sample.json +68 -0
- data/samples/sample.pas +276 -0
- data/samples/sample.php +303 -0
- data/samples/sample.py +290 -0
- data/samples/sample.rb +160 -0
- data/samples/sample.rs +391 -0
- data/samples/sample.sh +142 -0
- data/samples/sample.sql +352 -0
- data/samples/sample.swift +482 -0
- data/samples/sample.tf +150 -0
- data/samples/sample.yaml +182 -0
- metadata +22 -1
data/samples/sample.yaml
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# YAML sample file
|
|
2
|
+
# Single line comment
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
# --- Scalars ---
|
|
6
|
+
string_plain: Hello World
|
|
7
|
+
string_double: "Hello, \"World\"!\nNew line\ttab"
|
|
8
|
+
string_single: 'Hello, ''World''!'
|
|
9
|
+
empty_string: ""
|
|
10
|
+
|
|
11
|
+
# --- Block scalars ---
|
|
12
|
+
literal_block: |
|
|
13
|
+
This preserves
|
|
14
|
+
newlines exactly
|
|
15
|
+
as written.
|
|
16
|
+
|
|
17
|
+
folded_block: >
|
|
18
|
+
This folds
|
|
19
|
+
newlines into
|
|
20
|
+
spaces.
|
|
21
|
+
|
|
22
|
+
literal_strip: |-
|
|
23
|
+
No trailing newline
|
|
24
|
+
|
|
25
|
+
folded_keep: >+
|
|
26
|
+
Keep trailing newlines
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# --- Numbers ---
|
|
30
|
+
integer: 42
|
|
31
|
+
negative: -17
|
|
32
|
+
hex: 0xFF
|
|
33
|
+
octal: 0o77
|
|
34
|
+
float: 3.14159
|
|
35
|
+
negative_float: -2.71828
|
|
36
|
+
scientific: 1.5e+10
|
|
37
|
+
infinity: .inf
|
|
38
|
+
negative_infinity: -.inf
|
|
39
|
+
not_a_number: .nan
|
|
40
|
+
|
|
41
|
+
# --- Booleans ---
|
|
42
|
+
boolean_true: true
|
|
43
|
+
boolean_false: false
|
|
44
|
+
boolean_yes: yes
|
|
45
|
+
boolean_no: no
|
|
46
|
+
boolean_on: on
|
|
47
|
+
boolean_off: off
|
|
48
|
+
|
|
49
|
+
# --- Null ---
|
|
50
|
+
null_value: null
|
|
51
|
+
null_tilde: ~
|
|
52
|
+
null_empty:
|
|
53
|
+
|
|
54
|
+
# --- Sequences ---
|
|
55
|
+
simple_list:
|
|
56
|
+
- apple
|
|
57
|
+
- banana
|
|
58
|
+
- cherry
|
|
59
|
+
|
|
60
|
+
nested_list:
|
|
61
|
+
- - 1
|
|
62
|
+
- 2
|
|
63
|
+
- 3
|
|
64
|
+
- - a
|
|
65
|
+
- b
|
|
66
|
+
- c
|
|
67
|
+
|
|
68
|
+
flow_sequence: [1, 2, 3, 4, 5]
|
|
69
|
+
|
|
70
|
+
# --- Mappings ---
|
|
71
|
+
simple_map:
|
|
72
|
+
name: Alice
|
|
73
|
+
age: 30
|
|
74
|
+
active: true
|
|
75
|
+
|
|
76
|
+
nested_map:
|
|
77
|
+
user:
|
|
78
|
+
name: Bob
|
|
79
|
+
address:
|
|
80
|
+
street: 123 Main St
|
|
81
|
+
city: Anytown
|
|
82
|
+
zip: "12345"
|
|
83
|
+
|
|
84
|
+
flow_mapping: {name: Charlie, age: 25}
|
|
85
|
+
|
|
86
|
+
# --- Complex keys ---
|
|
87
|
+
? [complex, key]
|
|
88
|
+
: complex value
|
|
89
|
+
|
|
90
|
+
? |
|
|
91
|
+
multiline
|
|
92
|
+
key
|
|
93
|
+
: multiline key value
|
|
94
|
+
|
|
95
|
+
# --- Anchors & Aliases ---
|
|
96
|
+
defaults: &defaults
|
|
97
|
+
adapter: postgres
|
|
98
|
+
host: localhost
|
|
99
|
+
port: 5432
|
|
100
|
+
|
|
101
|
+
development:
|
|
102
|
+
database: myapp_dev
|
|
103
|
+
<<: *defaults
|
|
104
|
+
|
|
105
|
+
production:
|
|
106
|
+
database: myapp_prod
|
|
107
|
+
<<: *defaults
|
|
108
|
+
host: db.example.com
|
|
109
|
+
|
|
110
|
+
# --- Tags ---
|
|
111
|
+
tagged_string: !!str 42
|
|
112
|
+
tagged_int: !!int "42"
|
|
113
|
+
tagged_float: !!float "3.14"
|
|
114
|
+
tagged_bool: !!bool "true"
|
|
115
|
+
tagged_null: !!null ""
|
|
116
|
+
tagged_binary: !!binary |
|
|
117
|
+
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAA
|
|
118
|
+
ABAAEAAAICRAEAOw==
|
|
119
|
+
|
|
120
|
+
custom_tag: !custom_type
|
|
121
|
+
field1: value1
|
|
122
|
+
field2: value2
|
|
123
|
+
|
|
124
|
+
# --- Multi-document ---
|
|
125
|
+
...
|
|
126
|
+
---
|
|
127
|
+
# Second document
|
|
128
|
+
second_doc: true
|
|
129
|
+
message: "This is document 2"
|
|
130
|
+
|
|
131
|
+
# --- Timestamps ---
|
|
132
|
+
datetime: 2024-01-15T10:30:00Z
|
|
133
|
+
date: 2024-01-15
|
|
134
|
+
time_with_offset: 2024-01-15T10:30:00+09:00
|
|
135
|
+
|
|
136
|
+
# --- Merge key ---
|
|
137
|
+
base: &base
|
|
138
|
+
color: red
|
|
139
|
+
size: large
|
|
140
|
+
|
|
141
|
+
extended:
|
|
142
|
+
<<: *base
|
|
143
|
+
color: blue
|
|
144
|
+
extra: value
|
|
145
|
+
|
|
146
|
+
# --- Set ---
|
|
147
|
+
set_example: !!set
|
|
148
|
+
? item1
|
|
149
|
+
? item2
|
|
150
|
+
? item3
|
|
151
|
+
|
|
152
|
+
# --- Ordered map ---
|
|
153
|
+
ordered: !!omap
|
|
154
|
+
- first: 1
|
|
155
|
+
- second: 2
|
|
156
|
+
- third: 3
|
|
157
|
+
|
|
158
|
+
# --- Deeply nested ---
|
|
159
|
+
deep:
|
|
160
|
+
level1:
|
|
161
|
+
level2:
|
|
162
|
+
level3:
|
|
163
|
+
level4:
|
|
164
|
+
value: "deep value"
|
|
165
|
+
list:
|
|
166
|
+
- a
|
|
167
|
+
- b
|
|
168
|
+
- c
|
|
169
|
+
|
|
170
|
+
# --- Mixed types in sequence ---
|
|
171
|
+
mixed:
|
|
172
|
+
- "string"
|
|
173
|
+
- 42
|
|
174
|
+
- 3.14
|
|
175
|
+
- true
|
|
176
|
+
- null
|
|
177
|
+
- [nested, list]
|
|
178
|
+
- {nested: map}
|
|
179
|
+
|
|
180
|
+
# --- Directives ---
|
|
181
|
+
# %YAML 1.2
|
|
182
|
+
# %TAG !custom! tag:example.com,2024:
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: textbringer-tree-sitter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yancya
|
|
@@ -117,6 +117,27 @@ files:
|
|
|
117
117
|
- parsers/darwin-x64/.gitkeep
|
|
118
118
|
- parsers/linux-arm64/.gitkeep
|
|
119
119
|
- parsers/linux-x64/.gitkeep
|
|
120
|
+
- samples/Sample.java
|
|
121
|
+
- samples/sample.c
|
|
122
|
+
- samples/sample.cob
|
|
123
|
+
- samples/sample.cr
|
|
124
|
+
- samples/sample.cs
|
|
125
|
+
- samples/sample.ex
|
|
126
|
+
- samples/sample.groovy
|
|
127
|
+
- samples/sample.haml
|
|
128
|
+
- samples/sample.html
|
|
129
|
+
- samples/sample.js
|
|
130
|
+
- samples/sample.json
|
|
131
|
+
- samples/sample.pas
|
|
132
|
+
- samples/sample.php
|
|
133
|
+
- samples/sample.py
|
|
134
|
+
- samples/sample.rb
|
|
135
|
+
- samples/sample.rs
|
|
136
|
+
- samples/sample.sh
|
|
137
|
+
- samples/sample.sql
|
|
138
|
+
- samples/sample.swift
|
|
139
|
+
- samples/sample.tf
|
|
140
|
+
- samples/sample.yaml
|
|
120
141
|
- scripts/build_parsers.sh
|
|
121
142
|
- scripts/download_parsers.sh
|
|
122
143
|
- scripts/test_parser.rb
|