Skip to content

Commit

Permalink
fix(lang): Add highlighting for ScalarStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
siketyan committed Nov 15, 2024
1 parent 42bc620 commit c75eb17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class TypeSpecHighlightingAnnotator : Annotator {
is TypeSpecTypeReference -> newAnnotation(element.path.identifier ?: element.path.memberExpression?.lastChild!!, holder, TypeSpecColors.TYPE_REFERENCE)
is TypeSpecDecorator -> newAnnotation(element.path, holder, TypeSpecColors.DECORATOR)
is TypeSpecDirective -> newAnnotation(element.identifier, holder, TypeSpecColors.DECORATOR)
is TypeSpecScalarStatement -> newAnnotation(element.identifier, holder, TypeSpecColors.TYPE)
is TypeSpecEnumStatement -> newAnnotation(element.identifier, holder, TypeSpecColors.TYPE)
is TypeSpecUnionStatement -> newAnnotation(element.identifier, holder, TypeSpecColors.TYPE)
is TypeSpecModelStatement -> newAnnotation(element.identifier, holder, TypeSpecColors.TYPE)
Expand All @@ -21,7 +22,7 @@ class TypeSpecHighlightingAnnotator : Annotator {
is TypeSpecAliasStatement -> newAnnotation(element.identifier, holder, TypeSpecColors.TYPE)
is TypeSpecExternDecoratorStatement -> newAnnotation(element.identifier, holder, TypeSpecColors.DECORATOR)
is TypeSpecAugmentDecoratorStatement -> newAnnotation(element.path, holder, TypeSpecColors.DECORATOR)
is TypeSpecTypeParameterList -> element.typeParameterList.forEach { newAnnotation(it, holder, TypeSpecColors.TYPE) }
is TypeSpecTypeParameterList -> element.typeParameterList.forEach { newAnnotation(it.identifier, holder, TypeSpecColors.TYPE) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TypeSpecTokenType(debugName: String) : IElementType(debugName, TypeSpecLan

val TYPESPEC_STRINGS = create(STRING_LITERAL)
val TYPESPEC_COMMENTS = create(DOC_COMMENT, BLOCK_COMMENT, LINE_COMMENT)
val TYPESPEC_KEYWORDS = create(IMPORT, USING, NAMESPACE, ENUM, UNION, MODEL, INTERFACE, EXTENDS, IS, OP, ALIAS, EXTERN, DEC, VALUEOF, TYPEOF, TRUE, FALSE, VOID, NEVER, ANY)
val TYPESPEC_KEYWORDS = create(IMPORT, USING, NAMESPACE, SCALAR, INIT, ENUM, UNION, MODEL, INTERFACE, EXTENDS, IS, OP, ALIAS, EXTERN, DEC, VALUEOF, TYPEOF, TRUE, FALSE, VOID, NEVER, ANY)
val TYPESPEC_BRACES = create(LBRACE, RBRACE, HASHLBRACE)
val TYPESPEC_BRACKETS = create(LBRACKET, RBRACKET, HASHLBRACKET)
val TYPESPEC_PARENTHESES = create(LPAREN, RPAREN)

0 comments on commit c75eb17

Please sign in to comment.