VSCode batch-replace script helps developers with new INTERFACE syntax #1238
Replies: 4 comments
-
This is cool, I often look for this kind of 'automatic conversion after a syntax change' stuff and I never know where to find it, so right place or not: thanks for putting it somewhere! I also wouldn't know where to put this, as the usefulness of this will slowly expire as people upgrade to the new syntax, and most places to put stuff are meant for the permanent putting of stuff, but since issues only remain open temporarily, this might be the best place we have for it. Too bad we don't have a "news" section on some website. Perhaps @stefjoosten has an idea on where to put this? |
Beta Was this translation helpful? Give feedback.
-
Cool indeed. Depending on the usecase, your language, you might be interested in tree-sitter as well. |
Beta Was this translation helpful? Give feedback.
-
Since you're so enthusiastic about this, I modified the original post to include my updated script, which has some bugfixes and will now modify both |
Beta Was this translation helpful? Give feedback.
-
Way to go! This issue relates to #1084 |
Beta Was this translation helpful? Give feedback.
-
I'm not sure where else to put it, so basically this issue asks where we should put this stuff.
The 'stuff' is a (self documented) vscode-batch-replace-script.txt (note: updated with bugfixes!) that helps developers upgrade to the new interface syntax, by replacing the old interface syntax (e.g.
ROWS
orCOLSNL
) with the new syntax (BOX <FORM>
resp.BOX <TABLE noHeader>
) in all.adl
and.ifc
files that they have in an entire VSCode workspace. If you have additional extensions, you can edit thefilter
command on line 17 of the script accordingly.The script does not guarantee that the semantics remain intact. After all, this is a breaking change in Ampersand.
You can run this script by the Batch Replacer extension of VSCode. After installation, do as if you are editing the script, press Ctrl-Shift-P (as you are editing the script), then search for
Batch Replacer
, and execute it.Beta Was this translation helpful? Give feedback.
All reactions