Milys / NC-Gcode-VSCode

GCode Syntax Highlighter for VSCode
MIT License
14 stars 8 forks source link

; comments improperly formatting #12

Open Miniclubbin opened 1 year ago

Miniclubbin commented 1 year ago

using ";" for comments renders them white instead of green. I had to switch back to the original nc-gcode version to get them green again.

Is there a setting I am missing in the preview version?

keyfox11 commented 1 year ago

Using ";" to delimit a commented line is actually incorrect behavior as far as I know.

It's possible there are machine tools that use ";" as a comment identifier but I don't believe that complies with the ISO standard for G-Code. The standard I'm used to using would comment out a line by enclosing it in parenthesis:

G00 G53 Z0.
(G54 X0.)
G53 Y0.
marc-medley commented 5 months ago

NIST RS274NGC Interpreter - Version 3 standard specifies parenthesis for comments.

G80 M5 (stop motion)
G80 M5 (MSG stop motion)

The semicolon comment syntax ; is used for RepRap based 3D printer G-code comments. Where, relative to RepRap type 3D printers, "Some firmwares also obey the CNC G-code standard, which is to enclose comments in round brackets."

N3 T0*57 ; This is a comment
; So is this
N5 G28*22

(CNC G-code standard comment)
G28 (specify axes to be homed) X Y