{"name":"VSCode GCode Syntax","scopeName":"source.gcode","patterns":[{"include":"#all"}],"repository":{"all":{"patterns":[{"include":"#comments"},{"include":"#control"},{"include":"#gcodes"},{"include":"#mcodes"},{"include":"#operators"},{"include":"#speedsfeeds"},{"include":"#prognumbers"},{"include":"#coords"},{"include":"#tools"},{"include":"#modifiers"},{"include":"#macrovars"},{"include":"#rs274ngc"}]},"comments":{"patterns":[{"name":"comment.gcode","match":"(\\(.+\\))"},{"name":"comment.gcode","begin":";","end":"\\n"}]},"control":{"patterns":[{"name":"keyword.control.gcode","match":"(?i)(GOTO\\s?\\d+)"},{"name":"keyword.control.gcode","match":"(?i)(EQ|NE|LT|GT|LE|GE|AND|OR|XOR)"},{"name":"keyword.control.gcode","match":"(?i)(DO\\s?\\d*|WHILE|WH|END|IF|THEN|ELSE|ENDIF)"},{"name":"string.gcode","match":"([\\%])"}]},"coords":{"patterns":[{"name":"string.gcode","match":"([xX])\\s?(\\-?\\d*\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]))"},{"name":"string.gcode","match":"([yY])\\s?(\\-?\\d*\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]))"},{"name":"invalid.gcode","match":"([zZ])\\s?(\\-?\\d*\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]))"},{"name":"constant.character.escape.gcode","match":"([aAbBcC])\\s?(\\-*\\d?\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]))"}]},"gcodes":{"patterns":[{"name":"constant.numeric.gcode","match":"[gG](1)?5[4-9](.1)?\\s?(P[0-9]{1,3})?"},{"name":"constant.numeric.gcode","match":"[gG]1[1-2][0-9]"},{"name":"constant.numeric.gcode","match":"[gG]15\\s?(H[0-9]{1,2})?"},{"name":"markup.bold.gcode","match":"[gG][0-9]{1,3}(\\.[0-9])?"}]},"macrovars":{"patterns":[{"name":"variable.other.gcode","match":"[#][0-9]*"}]},"mcodes":{"patterns":[{"name":"keyword.operator.quantifier.regexp.gcode","match":"[mM][0-9]{1,3}"}]},"modifiers":{"patterns":[{"name":"constant.character.escape.gcode","match":"([iIjJkK])(\\-?\\d*\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]))"},{"name":"support.constant.math.gcode","match":"([qQrR])(\\-?\\d*\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]]))"},{"name":"support.constant.math.gcode","match":"([uUwW])(\\-?\\d*\\.?\\d+\\.?|\\-?\\.?(?=[#\\[]]))"}]},"operators":{"patterns":[{"name":"support.constant.math.gcode","match":"(?i)(SIN|COS|TAN|ASIN|ACOS|ATAN|FIX|FUP|LN|ROUND|SQRT)"},{"name":"support.constant.math.gcode","match":"(?i)(FIX|FUP|ROUND|ABS|MOD)"},{"name":"support.constant.math.gcode","match":"(\\+|\\*|\\/|\\*\\*)"},{"name":"invalid.gcode","match":"(\\-)"}]},"prognumbers":{"patterns":[{"name":"constant.numeric.gcode","match":"(^[nN])(\\d+)"},{"name":"string.regexp.gcode","match":"(^[oO])(\\d+)?"},{"name":"string.regexp.gcode","match":"([pP])\\s?(\\d?\\.?\\d+\\.?|\\.?(?=[#\\[]))"}]},"rs274ngc":{"patterns":[{"name":"keyword.control.gcode","match":"(?i)(ENDSUB|SUB)"},{"name":"support.type.gcode","begin":"\u003c","end":"\u003e","beginCaptures":{"0":{"name":"markup.bold.gcode"}},"endCaptures":{"0":{"name":"markup.bold.gcode"}}}]},"speedsfeeds":{"patterns":[{"name":"constant.language.gcode","match":"([sS])\\s?(\\d+|(?=[#\\[]))"},{"name":"constant.language.gcode","match":"([eEfF])\\s?\\.?(\\d+(\\.\\d*)?|(?=[#\\[]))"}]},"tools":{"patterns":[{"name":"constant.character.gcode","match":"([dD])\\s?(\\d+(\\.\\d*)?|(?=[#\\[]))"},{"name":"constant.character.gcode","match":"([hH])\\s?(\\d+(\\.\\d*)?|(?=[#\\[]))"},{"name":"constant.character.gcode","match":"([tT])\\s?(\\d+(\\.\\d*)?|(?=[#\\[]))"}]}}}
