Fix type parsing in CodeMirror and highlight them (#5674)
* Add new types and fix capitalization in CodeMirror grammar * Add syntax highlighting for types
This commit is contained in:
@ -29,6 +29,7 @@ export const kclHighlight = styleTags({
|
||||
'ObjectProperty/PropertyName': t.definition(t.propertyName),
|
||||
'LabeledArgument/ArgumentLabel': t.definition(t.propertyName),
|
||||
TagDeclarator: t.tagName,
|
||||
PrimitiveType: t.typeName,
|
||||
'( )': t.paren,
|
||||
'{ }': t.brace,
|
||||
'[ ]': t.bracket,
|
||||
|
@ -77,7 +77,7 @@ ArgumentList { "(" commaSep<LabeledArgument | expression> ")" }
|
||||
type[@isGroup=Type] {
|
||||
@specialize[@name=PrimitiveType]<
|
||||
identifier,
|
||||
"string" | "number" | "bool" | "sketch" | "sketch_surface" | "solid"
|
||||
"bool" | "number" | "string" | "tag" | "Sketch" | "SketchSurface" | "Solid" | "Plane"
|
||||
> |
|
||||
ArrayType { type !member "[" "]" } |
|
||||
ObjectType { "{" commaSep<ObjectProperty { PropertyName ":" type }> "}" }
|
||||
|
Reference in New Issue
Block a user