Commit 8b9c7c3
feat(grammar): add object-list keywords for pluggable widgets
Refs: mendixlabs#538 (Phase 1 Layer 3 — grammar piece)
Adds five new lexer tokens for object-list child blocks in pluggable
widgets: GROUP (Accordion groups), CUSTOMITEM (PopupMenu customItems),
MARKER + DYNAMICMARKER (Maps), SERIES (AreaChart). ITEM was already
defined for navigation list items and is reused.
Threads them through:
- mdl/grammar/MDLLexer.g4: token definitions
- mdl/grammar/domains/MDLPage.g4: extend widgetTypeV3 alternation
- mdl/grammar/domains/MDLSettings.g4: extend keyword rule (so they can
be used as identifier-shaped property names where needed)
The aspirational fixture 32-pluggable-widget-object-lists-v010.test.mdl
now passes mxcli check (18 statements). Its header is updated to reflect
that grammar parses the syntax but the executor wiring for object-list
items is still missing — running `mxcli exec` against it would not
produce correct BSON yet. Filename keeps `.test.mdl` suffix until that
gap closes.
Two test cases (OL05 AreaChart series with StaticDataSource, OL07 Maps
dynamicMarkers with MarkersDS) had datasource expressions in sub-property
positions that the existing widgetPropertyV3 rule doesn't accept. Those
were simplified inline with TODO markers; full datasource-in-sub-property
support is a follow-up.
Layer 3's executor wiring (route AST children to def.json objectLists,
serialize each list item to BSON via WidgetEngine extensions) is the
remaining piece of Phase 1 and is intentionally out of scope here.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 377f23f commit 8b9c7c3
5 files changed
Lines changed: 46 additions & 23 deletions
File tree
- cmd/mxcli
- mdl-examples/doctype-tests
- mdl/grammar
- domains
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
219 | | - | |
| 224 | + | |
220 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
221 | 232 | | |
222 | 233 | | |
223 | 234 | | |
| |||
230 | 241 | | |
231 | 242 | | |
232 | 243 | | |
233 | | - | |
234 | 244 | | |
235 | | - | |
236 | | - | |
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
241 | | - | |
242 | 249 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 250 | | |
254 | 251 | | |
255 | 252 | | |
| |||
304 | 301 | | |
305 | 302 | | |
306 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| |||
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 322 | | |
326 | 323 | | |
327 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
256 | 265 | | |
257 | 266 | | |
258 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
247 | 257 | | |
248 | 258 | | |
249 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
535 | 537 | | |
536 | 538 | | |
537 | 539 | | |
| |||
0 commit comments