
"SIGOURE" == SIGOURE Benoit <sigoure.benoit@lrde.epita.fr> writes:
Add array declarations (sugar). It is now possible to declare arrays such as: b[4][3] : bool; Multi-dimensional arrays are correctly handled.
This is really nice. I would like to emphasize, though, that, unless you plan to make "b[4]" actually mean something here, the user would rather write b[4, 3]. Again, that's only sugar.
+ /** + ** Patch the list of dimensions with the meta-var used in the meta for loop. + ** Basically this strategy generates a new meta-var used as the iterator + ** in the meta-for loop and updates the dimensions of the declared array. + ** The dimension updated is the first one matching Int(_)
A minor nit: Please don't forget the ending period for sentences. That's a frequent mistake.
+// FIXME: Try to figure out why concrete syntax fails to work here
You bet!
xrm-to-prism = /* remove XRM sugar, normalize some nodes */ - topdown(try(xrm-to-prism-desugar)) + innermost(xrm-to-prism-desugar)
What made you change this?
Index: tests/xrm/globals.xpm --- tests/xrm/globals.xpm (revision 0) +++ tests/xrm/globals.xpm (revision 0) @@ -0,0 +1,3 @@ +for i from 0 to 4 do + global x[i] : bool; +end
I don't really understand how works your test suite. Shouldn't you be also checking in the expected output?