original file ----------------------------------- interface X { x(): void y: number } export function foo(): void class x { } ----------------------------------- Grammar: TypeScript.tmLanguage ----------------------------------- >interface X { ^^^^^^^^^ source.ts meta.interface.ts storage.type.interface.ts ^ source.ts meta.interface.ts ^ source.ts meta.interface.ts entity.name.type.interface.ts ^ source.ts meta.interface.ts ^ source.ts meta.interface.ts punctuation.definition.block.ts > x(): void ^^^^ source.ts meta.interface.ts meta.method.declaration.ts ^ source.ts meta.interface.ts meta.method.declaration.ts meta.definition.method.ts entity.name.function.ts ^ source.ts meta.interface.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts ^ source.ts meta.interface.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts ^ source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts keyword.operator.type.annotation.ts ^ source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts ^^^^ source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts support.type.primitive.ts > y: number ^^^^ source.ts meta.interface.ts meta.field.declaration.ts ^ source.ts meta.interface.ts meta.field.declaration.ts meta.definition.property.ts variable.object.property.ts ^ source.ts meta.interface.ts meta.field.declaration.ts meta.type.annotation.ts keyword.operator.type.annotation.ts ^ source.ts meta.interface.ts meta.field.declaration.ts meta.type.annotation.ts ^^^^^^ source.ts meta.interface.ts meta.field.declaration.ts meta.type.annotation.ts support.type.primitive.ts >} ^ source.ts meta.interface.ts punctuation.definition.block.ts >export function foo(): void ^^^^^^ source.ts meta.function.ts keyword.control.export.ts ^ source.ts meta.function.ts ^^^^^^^^ source.ts meta.function.ts storage.type.function.ts ^ source.ts meta.function.ts ^^^ source.ts meta.function.ts meta.definition.function.ts entity.name.function.ts ^ source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts ^ source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts ^ source.ts meta.function.ts meta.return.type.ts keyword.operator.type.annotation.ts ^ source.ts meta.function.ts meta.return.type.ts ^^^^ source.ts meta.function.ts meta.return.type.ts support.type.primitive.ts >class x { } ^^^^^ source.ts meta.class.ts storage.type.class.ts ^ source.ts meta.class.ts ^ source.ts meta.class.ts entity.name.type.class.ts ^ source.ts meta.class.ts ^ source.ts meta.class.ts punctuation.definition.block.ts ^ source.ts meta.class.ts ^ source.ts meta.class.ts punctuation.definition.block.ts