I have this concrete syntax:
syntax SomeMore = [...] SyncBlock? sync;
syntax SyncBlock = "sync" "{" SyncStatement* stats "}";
syntax SyncStatement = [...];
[SyncBlock]"sync { <syncStrings> }"
seems to work, but when I try to use it as a SyncBlock?
and assign it:
SyncBlock? sync = [SyncBlock?]"sync { <syncStrings> }"
it does not work: inline parsing not supported on SyncBlock?
, what is the easiest way to build up a value of this X?
-type?
Can I convert a SyncBlock
to a SyncBlock?
somehow?
Something like this also doesn’t work:
syncBlock = (SyncBlock?)`sync { <SyncStatement* syncs>}`;
P.S. SyncBlock? syncBlock = …
results in Ambiguous code (internal error), SyncBlock? syncBlock = …
. Probably due to a ternary operator ambiguity?