Commit 36092ea
authored
Release 0.4.0: grammar fixes, auto-indent fix, updated docs (#24)
* fix: support ::TopLevel leading scope resolution (BUG-015b)
Allow ScopeResolution to start with :: prefix for top-level constant
references like ::TopLevel and ::TopLevel::Foo. Also support :: prefix
in className for class/module definitions. Uses ~scopeOrClass GLR marker
to resolve ambiguity between className's :: repetition and ScopeResolution.
* fix: add HashPattern for pattern matching in case/in (BUG-026a)
Add HashPattern and HashPatternPair rules reachable only from InClause
for Ruby 3.0+ pattern matching. Supports {name: String => n} binding
syntax and {name:} shorthand. Uses ~hashOrPattern GLR marker to resolve
ambiguity with regular Hash/HashPair rules.
* fix: add FindPattern for pattern matching [*, value, *] (BUG-026c)
Add FindPattern rule reachable from InClause for Ruby 3.0+ find patterns.
Requires leading * to unambiguously distinguish from regular Array.
Supports [*, value, *] and [*pre, value, *post] forms.
* chore: bump to 0.4.0, fix auto-indent, update docs and demo
- Fix rubyIndentService to use cx.lineAt() instead of raw doc access,
so auto-indent on Enter respects simulateBreak
- Update README: add new features to "What's supported", remove stale
limitations (symbol-key shorthand, ::TopLevel, hash/find patterns),
add guard clause limitation, update Rails benchmark 94.2% → 94.3%
- Rebuild demo for GitHub Pages
- Bump version to 0.4.01 parent bb800b7 commit 36092ea
6 files changed
Lines changed: 205 additions & 125 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
7 | 24 | | |
8 | 25 | | |
9 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
76 | 90 | | |
77 | | - | |
78 | | - | |
| 91 | + | |
79 | 92 | | |
80 | | - | |
| 93 | + | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
86 | 99 | | |
87 | 100 | | |
88 | | - | |
89 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
94 | | - | |
| 110 | + | |
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
| |||
101 | 117 | | |
102 | 118 | | |
103 | 119 | | |
104 | | - | |
| 120 | + | |
105 | 121 | | |
106 | 122 | | |
107 | 123 | | |
108 | 124 | | |
109 | 125 | | |
110 | | - | |
| 126 | + | |
111 | 127 | | |
112 | 128 | | |
113 | 129 | | |
| |||
120 | 136 | | |
121 | 137 | | |
122 | 138 | | |
123 | | - | |
124 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
125 | 144 | | |
126 | 145 | | |
127 | 146 | | |
128 | | - | |
| 147 | + | |
129 | 148 | | |
130 | 149 | | |
131 | 150 | | |
| |||
134 | 153 | | |
135 | 154 | | |
136 | 155 | | |
137 | | - | |
| 156 | + | |
138 | 157 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
142 | 163 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 164 | + | |
| 165 | + | |
146 | 166 | | |
147 | 167 | | |
148 | 168 | | |
| |||
172 | 192 | | |
173 | 193 | | |
174 | 194 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
182 | 204 | | |
183 | | - | |
| 205 | + | |
184 | 206 | | |
185 | 207 | | |
186 | 208 | | |
187 | | - | |
| 209 | + | |
188 | 210 | | |
189 | 211 | | |
190 | 212 | | |
191 | 213 | | |
192 | 214 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
198 | 222 | | |
199 | 223 | | |
200 | 224 | | |
| |||
204 | 228 | | |
205 | 229 | | |
206 | 230 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
212 | 238 | | |
213 | 239 | | |
214 | 240 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
221 | 249 | | |
222 | | - | |
| 250 | + | |
223 | 251 | | |
224 | | - | |
| 252 | + | |
225 | 253 | | |
226 | 254 | | |
227 | 255 | | |
228 | | - | |
| 256 | + | |
229 | 257 | | |
230 | 258 | | |
231 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
183 | 195 | | |
184 | 196 | | |
185 | 197 | | |
| |||
289 | 301 | | |
290 | 302 | | |
291 | 303 | | |
292 | | - | |
| 304 | + | |
293 | 305 | | |
294 | | - | |
| 306 | + | |
| 307 | + | |
295 | 308 | | |
296 | 309 | | |
297 | 310 | | |
| |||
412 | 425 | | |
413 | 426 | | |
414 | 427 | | |
415 | | - | |
| 428 | + | |
416 | 429 | | |
417 | 430 | | |
418 | 431 | | |
| |||
0 commit comments