Closed dvrensk closed 3 years ago
Thanks for this. Have you raised an issue on the extension itself? I think I'd prefer this was fixed at source, rather than patching over the underlying issue.
Hi! No, I haven't contacted them yet. I agree that the issue should be fixed at the root, but they are aware of the problems and have this to say in their documentation:
Divergences The goal is, that the Xtext grammar (used in this extension) is compliant to the origin language reference. However the Xtext grammar is a bit more strict in some points:
- Double quote characters ("...") are mandatory, even when a property does not contain whitespaces
- You can't use keywords like person or container as variable names
I hope that they will find a fix for this in the longer run, but right now, I can live with some capriciousness on part of the extension if it means that I get a working close-to-real-time preview function.
I think I'd recommend:
if people are using the extension, I imagine they would look there for examples anyway.
Maybe they will. I know it never occurred to me, because I was perusing your sites and found the following:
So, following instructions on your sites, I got an editor with red squigglies. That's what I am trying to fix for my colleagues and others who might follow a similar path.
I absolutely plan to open tickets and one day PRs with the plugin, but I don't see it as an either-or.
As for your comment on removing double-quotes, yes, I saw the irony too. They have built a grammar that's too strict, and whether that is fixable without swapping out the grammar engine remains to be seen. In the meanwhile, having examples that work with the admittedly slightly broken plugin that you link to can't be such a bad idea, can it?
Thanks, understood, but this issue needs to be dealt with at source. Since the divergences are noted, and the extension has its own set of examples, I've added a note to the DSL tooling page with some links.
The
systemticks.c4-dsl-extension
for VS Code has important features like in-editor previews but disallows some valid DSL. This commit caters to the lowest common denominator in the interest of smoothing adaption.