Extended G-code syntax
- Parenthesized comments - Multiple E values split by colons (RepRapFirmware)
This commit is contained in:
@ -97,6 +97,12 @@ contexts:
|
||||
2: punctuation.quote.double.open.gcode
|
||||
push: gcode_string_arg_quoted_double
|
||||
|
||||
# parameter and list of values
|
||||
- match: ([Ee])\s*(({{decimal}}\s*:\s*)+{{decimal}})
|
||||
captures:
|
||||
1: keyword.param.gcode
|
||||
2: constant.numeric.param.gcode
|
||||
|
||||
# parameter and numeric value
|
||||
- match: ([A-Za-z])\s*({{decimal}})
|
||||
captures:
|
||||
@ -189,6 +195,9 @@ contexts:
|
||||
- match: \s*;
|
||||
scope: punctuation.comment.eol.start
|
||||
set: gcode_comment
|
||||
- match: \s*\(
|
||||
scope: punctuation.paren.comment.open
|
||||
push: gcode_comment_paren
|
||||
|
||||
# Comment to end of line.
|
||||
gcode_comment:
|
||||
@ -196,6 +205,18 @@ contexts:
|
||||
- match: \s*$
|
||||
pop: true
|
||||
|
||||
gcode_comment_paren:
|
||||
- meta_content_scope: paren.comment.gcode
|
||||
|
||||
- match: '[^)]+'
|
||||
|
||||
- match: '[)]'
|
||||
scope: punctuation.paren.comment.close
|
||||
pop: true
|
||||
|
||||
- match: \s*$
|
||||
pop: true
|
||||
|
||||
# Everything after this point is broken by a syntax error
|
||||
syntax_error:
|
||||
- meta_scope: invalid.error.syntax.gcode
|
||||
|
Reference in New Issue
Block a user