Open barthy-koeln opened 2 months ago
@joshgoebel thank you for your patience.
My latest commit added disableAutodetect: true
to the language, as well as the aforementioned on:begin
filter.
I added the filter as a variant to full matches with \b
.
This means that readable gcode with sane spacing will rarely, if ever, run into the callback filter.
I've tested both implementations with the existing markup test, as well as some 100lines of spaceless gcode. The results are always within 5% of each other, always in favor of the v12 language with lookbehinds.
Hey @joshgoebel, this is just a careful ping to see if I can or should do anything else here? I need this fix for a freelance project, but can use my fork for the initial release.
Edit: I seriously understand everyone's time is precious and this is free open-source work, so I'll accept any answer including "not now, will revisit later" :D
Complete rework of the
gcode
language to allow for extended uses cases. Not all scope rules will apply to all implementations of g-code, but many applications of gcode have added a lot on top of the original spec.This language implementation aims to be more extensive but still flexible.
My research has used the following documentations:
And countless code examples extracted from GitHub's search:
Changes
Question about code
I have used this pattern to re-use complex regexes:
I would like to use this for certain duplicated parts (e.g.
(?<![A-Z])
) as well. Is this acceptable? The performance impact is surely negligible since this only happens during initialisation. It greatly increases readability and IDE support in my opinion.Screenshots
Checklist
CHANGES.md