rbtr-lang-javascript 2026.9.0.dev0__py3-none-any.whl

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.
Files changed (32) hide show
  1. rbtr_lang_javascript/__init__.py +1 -0
  2. rbtr_lang_javascript/javascript.scm +4 -0
  3. rbtr_lang_javascript/plugin.py +190 -0
  4. rbtr_lang_javascript/py.typed +0 -0
  5. rbtr_lang_javascript/shared.scm +29 -0
  6. rbtr_lang_javascript/tests/__init__.py +0 -0
  7. rbtr_lang_javascript/tests/__snapshots__/test_samples/test_edges_match_snapshot[javascript].json +4 -0
  8. rbtr_lang_javascript/tests/__snapshots__/test_samples/test_edges_match_snapshot[tsx].json +3 -0
  9. rbtr_lang_javascript/tests/__snapshots__/test_samples/test_edges_match_snapshot[typescript].json +6 -0
  10. rbtr_lang_javascript/tests/__snapshots__/test_samples/test_extraction_matches_snapshot[javascript].json +420 -0
  11. rbtr_lang_javascript/tests/__snapshots__/test_samples/test_extraction_matches_snapshot[tsx].json +211 -0
  12. rbtr_lang_javascript/tests/__snapshots__/test_samples/test_extraction_matches_snapshot[typescript].json +610 -0
  13. rbtr_lang_javascript/tests/cases_docstrings.py +225 -0
  14. rbtr_lang_javascript/tests/cases_extraction.py +429 -0
  15. rbtr_lang_javascript/tests/samples/javascript/config.js +2 -0
  16. rbtr_lang_javascript/tests/samples/javascript/javascript.js +46 -0
  17. rbtr_lang_javascript/tests/samples/javascript/styles.css +3 -0
  18. rbtr_lang_javascript/tests/samples/tsx/labels.ts +2 -0
  19. rbtr_lang_javascript/tests/samples/tsx/tsx.tsx +33 -0
  20. rbtr_lang_javascript/tests/samples/typescript/config.ts +2 -0
  21. rbtr_lang_javascript/tests/samples/typescript/types.ts +2 -0
  22. rbtr_lang_javascript/tests/samples/typescript/typescript.ts +68 -0
  23. rbtr_lang_javascript/tests/test_docstrings.py +51 -0
  24. rbtr_lang_javascript/tests/test_extraction.py +80 -0
  25. rbtr_lang_javascript/tests/test_samples.py +95 -0
  26. rbtr_lang_javascript/typescript.scm +36 -0
  27. rbtr_lang_javascript/variables.scm +54 -0
  28. rbtr_lang_javascript-2026.9.0.dev0.dist-info/METADATA +74 -0
  29. rbtr_lang_javascript-2026.9.0.dev0.dist-info/RECORD +32 -0
  30. rbtr_lang_javascript-2026.9.0.dev0.dist-info/WHEEL +4 -0
  31. rbtr_lang_javascript-2026.9.0.dev0.dist-info/entry_points.txt +5 -0
  32. rbtr_lang_javascript-2026.9.0.dev0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,211 @@
1
+ [
2
+ {
3
+ "blob_sha": "sha1",
4
+ "file_path": "labels.ts",
5
+ "kind": "comment",
6
+ "name": "",
7
+ "scope": "",
8
+ "language": "typescript",
9
+ "file_language": "typescript",
10
+ "content": "// Default UI labels.",
11
+ "line_start": 1,
12
+ "line_end": 1,
13
+ "metadata": {
14
+ "module": "",
15
+ "names": "",
16
+ "dots": "",
17
+ "language_hint": ""
18
+ },
19
+ "id": "b0eec444d8e60c22"
20
+ },
21
+ {
22
+ "blob_sha": "sha1",
23
+ "file_path": "labels.ts",
24
+ "kind": "variable",
25
+ "name": "INITIAL_LABEL",
26
+ "scope": "",
27
+ "language": "typescript",
28
+ "file_language": "typescript",
29
+ "content": "INITIAL_LABEL = \"Click\"",
30
+ "line_start": 2,
31
+ "line_end": 2,
32
+ "metadata": {
33
+ "module": "",
34
+ "names": "",
35
+ "dots": "",
36
+ "language_hint": ""
37
+ },
38
+ "id": "e15fcebf90273140"
39
+ },
40
+ {
41
+ "blob_sha": "sha1",
42
+ "file_path": "tsx.tsx",
43
+ "kind": "comment",
44
+ "name": "",
45
+ "scope": "",
46
+ "language": "tsx",
47
+ "file_language": "tsx",
48
+ "content": "// Counter — a small React component rendering a clickable count.\n//\n// The tsx plugin uses the `language_tsx` grammar, not\n// `language_typescript`, which cannot parse JSX (a `.tsx` file parses\n// with errors under the plain TypeScript grammar). It runs the same\n// query as the typescript plugin against the JSX-aware grammar, so it\n// extracts function declarations, arrow-function consts, module\n// variables, imports, and interfaces (as classes — the CounterProps\n// interface below).",
49
+ "line_start": 1,
50
+ "line_end": 9,
51
+ "metadata": {
52
+ "module": "",
53
+ "names": "",
54
+ "dots": "",
55
+ "language_hint": ""
56
+ },
57
+ "id": "49a537d969adcd13"
58
+ },
59
+ {
60
+ "blob_sha": "sha1",
61
+ "file_path": "tsx.tsx",
62
+ "kind": "import",
63
+ "name": "import { useState } from \"react\";",
64
+ "scope": "",
65
+ "language": "tsx",
66
+ "file_language": "tsx",
67
+ "content": "import { useState } from \"react\";",
68
+ "line_start": 11,
69
+ "line_end": 11,
70
+ "metadata": {
71
+ "module": "react",
72
+ "names": "useState",
73
+ "dots": "",
74
+ "language_hint": ""
75
+ },
76
+ "id": "6cc02cbe179fd402"
77
+ },
78
+ {
79
+ "blob_sha": "sha1",
80
+ "file_path": "tsx.tsx",
81
+ "kind": "import",
82
+ "name": "import type { ReactNode } from \"react\";",
83
+ "scope": "",
84
+ "language": "tsx",
85
+ "file_language": "tsx",
86
+ "content": "import type { ReactNode } from \"react\";",
87
+ "line_start": 12,
88
+ "line_end": 12,
89
+ "metadata": {
90
+ "module": "react",
91
+ "names": "ReactNode",
92
+ "dots": "",
93
+ "language_hint": ""
94
+ },
95
+ "id": "317478445b3c1bfa"
96
+ },
97
+ {
98
+ "blob_sha": "sha1",
99
+ "file_path": "tsx.tsx",
100
+ "kind": "import",
101
+ "name": "import { INITIAL_LABEL } from \"./labels\";",
102
+ "scope": "",
103
+ "language": "tsx",
104
+ "file_language": "tsx",
105
+ "content": "import { INITIAL_LABEL } from \"./labels\";",
106
+ "line_start": 13,
107
+ "line_end": 13,
108
+ "metadata": {
109
+ "module": "labels",
110
+ "names": "INITIAL_LABEL",
111
+ "dots": "1",
112
+ "language_hint": ""
113
+ },
114
+ "id": "ef93f49242442e61"
115
+ },
116
+ {
117
+ "blob_sha": "sha1",
118
+ "file_path": "tsx.tsx",
119
+ "kind": "variable",
120
+ "name": "INITIAL_COUNT",
121
+ "scope": "",
122
+ "language": "tsx",
123
+ "file_language": "tsx",
124
+ "content": "INITIAL_COUNT: number = 0",
125
+ "line_start": 15,
126
+ "line_end": 15,
127
+ "metadata": {
128
+ "module": "",
129
+ "names": "",
130
+ "dots": "",
131
+ "language_hint": ""
132
+ },
133
+ "id": "c6fcfee749df034c"
134
+ },
135
+ {
136
+ "blob_sha": "sha1",
137
+ "file_path": "tsx.tsx",
138
+ "kind": "class",
139
+ "name": "CounterProps",
140
+ "scope": "",
141
+ "language": "tsx",
142
+ "file_language": "tsx",
143
+ "content": "/** Props for the Counter component. */\ninterface CounterProps {\n label: string;\n}",
144
+ "line_start": 17,
145
+ "line_end": 20,
146
+ "metadata": {
147
+ "module": "",
148
+ "names": "",
149
+ "dots": "",
150
+ "language_hint": ""
151
+ },
152
+ "id": "76be0c7bddd72f9c"
153
+ },
154
+ {
155
+ "blob_sha": "sha1",
156
+ "file_path": "tsx.tsx",
157
+ "kind": "comment",
158
+ "name": "",
159
+ "scope": "",
160
+ "language": "tsx",
161
+ "file_language": "tsx",
162
+ "content": "/** A button that increments a counter on each click. */",
163
+ "line_start": 22,
164
+ "line_end": 22,
165
+ "metadata": {
166
+ "module": "",
167
+ "names": "",
168
+ "dots": "",
169
+ "language_hint": ""
170
+ },
171
+ "id": "4a383838d37cc3d6"
172
+ },
173
+ {
174
+ "blob_sha": "sha1",
175
+ "file_path": "tsx.tsx",
176
+ "kind": "function",
177
+ "name": "Counter",
178
+ "scope": "",
179
+ "language": "tsx",
180
+ "file_language": "tsx",
181
+ "content": "function Counter({ label }: CounterProps): ReactNode {\n const [count, setCount] = useState(INITIAL_COUNT);\n return (\n <button onClick={() => setCount(count + 1)}>\n {label}: {count}\n </button>\n );\n}",
182
+ "line_start": 23,
183
+ "line_end": 30,
184
+ "metadata": {
185
+ "module": "",
186
+ "names": "",
187
+ "dots": "",
188
+ "language_hint": ""
189
+ },
190
+ "id": "5cbd4a63e11c44bd"
191
+ },
192
+ {
193
+ "blob_sha": "sha1",
194
+ "file_path": "tsx.tsx",
195
+ "kind": "function",
196
+ "name": "Badge",
197
+ "scope": "",
198
+ "language": "tsx",
199
+ "file_language": "tsx",
200
+ "content": "/** Render a static badge as a span. */\nconst Badge = (text: string): ReactNode => <span className=\"badge\">{text}</span>;",
201
+ "line_start": 32,
202
+ "line_end": 33,
203
+ "metadata": {
204
+ "module": "",
205
+ "names": "",
206
+ "dots": "",
207
+ "language_hint": ""
208
+ },
209
+ "id": "0b533208f078f9ef"
210
+ }
211
+ ]