|
| 1 | +// SYNTAX TEST "Packages/JavaScript/TypeScript.sublime-syntax" |
| 2 | + |
| 3 | + export as namespace O; |
| 4 | +// ^^^^^^^^^^^^^^^^^^^^^ meta.export |
| 5 | +// ^^^^^^ keyword.control.import-export |
| 6 | +// ^^ storage.modifier |
| 7 | +// ^^^^^^^^^ keyword.declaration |
| 8 | +// ^ entity.name.namespace |
| 9 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 10 | + |
| 11 | + export const x: any; |
| 12 | +// ^^^^^^^^^^^^^^^^^^^^ meta.export |
| 13 | +// ^^^^^^ keyword.control.import-export |
| 14 | +// ^^^^^ keyword.declaration |
| 15 | +// ^ meta.binding.name variable.other.readwrite |
| 16 | +// ^ punctuation.separator.type |
| 17 | +// ^^^ meta.type support.type.any |
| 18 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 19 | + |
| 20 | + export let y: any; |
| 21 | +// ^^^^^^^^^^^^^^^^^^ meta.export |
| 22 | +// ^^^^^^ keyword.control.import-export |
| 23 | +// ^^^ keyword.declaration |
| 24 | +// ^ meta.binding.name variable.other.readwrite |
| 25 | +// ^ punctuation.separator.type |
| 26 | +// ^^^ meta.type support.type.any |
| 27 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 28 | + |
| 29 | + export var z: any; |
| 30 | +// ^^^^^^^^^^^^^^^^^^ meta.export |
| 31 | +// ^^^^^^ keyword.control.import-export |
| 32 | +// ^^^ keyword.declaration |
| 33 | +// ^ meta.binding.name variable.other.readwrite |
| 34 | +// ^ punctuation.separator.type |
| 35 | +// ^^^ meta.type support.type.any |
| 36 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 37 | + |
| 38 | + export function f(x: any): any; |
| 39 | +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.export |
| 40 | +// ^^^^^^ keyword.control.import-export |
| 41 | +// ^^^^^^^^^^^^^^^^^^^^^^^ meta.function |
| 42 | +// ^^^^^^^^ keyword.declaration.function |
| 43 | +// ^ entity.name.function |
| 44 | +// ^^^^^^^^ meta.function.parameters |
| 45 | +// ^ punctuation.section.group.begin |
| 46 | +// ^ meta.binding.name variable.parameter.function |
| 47 | +// ^ punctuation.separator.type |
| 48 | +// ^^^ meta.type support.type.any |
| 49 | +// ^ punctuation.section.group.end |
| 50 | +// ^ punctuation.separator.type |
| 51 | +// ^^^ meta.type support.type.any |
| 52 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 53 | + |
| 54 | + export class C { |
| 55 | +// ^^^^^^^^^^^^^^^^ meta.export |
| 56 | +// ^^^^^^ keyword.control.import-export |
| 57 | +// ^^^^^^^^^ meta.class |
| 58 | +// ^^^^^ keyword.declaration.class |
| 59 | +// ^ entity.name.class |
| 60 | +// ^ meta.block punctuation.section.block.begin |
| 61 | + |
| 62 | + x: any; |
| 63 | +// ^ variable.other.readwrite |
| 64 | +// ^ punctuation.separator.type |
| 65 | +// ^^^^ meta.type |
| 66 | +// ^^^ support.type.any |
| 67 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 68 | + |
| 69 | + f(x: any): any; |
| 70 | +// ^^^^^^^^^^^^^^ meta.function |
| 71 | +// ^ entity.name.function |
| 72 | +// ^^^^^^^^ meta.function.parameters |
| 73 | +// ^ punctuation.section.group.begin |
| 74 | +// ^ meta.binding.name |
| 75 | +// ^ variable.parameter.function |
| 76 | +// ^ punctuation.separator.type |
| 77 | +// ^^^^ meta.type |
| 78 | +// ^^^ support.type.any |
| 79 | +// ^ punctuation.section.group.end |
| 80 | +// ^ punctuation.separator.type |
| 81 | +// ^^^^ meta.type |
| 82 | +// ^^^ support.type.any |
| 83 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 84 | + } |
| 85 | +// ^ punctuation.section.block.end |
| 86 | + |
| 87 | + export interface I {} |
| 88 | +// ^^^^^^^^^^^^^^^^^^^^^ meta.export |
| 89 | +// ^^^^^^ keyword.control.import-export |
| 90 | +// ^^^^^^^^^^^^^^ meta.interface |
| 91 | +// ^^^^^^^^^ keyword.declaration |
| 92 | +// ^ entity.name.interface |
| 93 | +// ^^ meta.block |
| 94 | +// ^ punctuation.section.block.begin |
| 95 | +// ^ punctuation.section.block.end |
| 96 | + |
| 97 | + |
| 98 | + export namespace N { |
| 99 | +// ^^^^^^^^^^^^^^^^^^^^ meta.export |
| 100 | +// ^^^^^^ keyword.control.import-export |
| 101 | +// ^^^^^^^^^^^^^ meta.namespace |
| 102 | +// ^^^^^^^^^ keyword.declaration |
| 103 | +// ^ entity.name.namespace |
| 104 | +// ^ meta.block punctuation.section.block.begin |
| 105 | + |
| 106 | + const x: any; |
| 107 | +// ^^^^^ keyword.declaration |
| 108 | +// ^ meta.binding.name |
| 109 | +// ^ variable.other.readwrite |
| 110 | +// ^ punctuation.separator.type |
| 111 | +// ^^^^ meta.type |
| 112 | +// ^^^ support.type.any |
| 113 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 114 | + |
| 115 | + } |
| 116 | +// ^ punctuation.section.block.end |
| 117 | + |
| 118 | + declare const a: any; |
| 119 | +// ^^^^^^^ storage.modifier |
| 120 | +// ^^^^^ keyword.declaration |
| 121 | +// ^ meta.binding.name variable.other.readwrite |
| 122 | +// ^ punctuation.separator.type |
| 123 | +// ^^^^ meta.type |
| 124 | +// ^^^ support.type.any |
| 125 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 126 | + |
| 127 | + declare let b: any; |
| 128 | +// ^^^^^^^ storage.modifier |
| 129 | +// ^^^ keyword.declaration |
| 130 | +// ^ meta.binding.name variable.other.readwrite |
| 131 | +// ^ punctuation.separator.type |
| 132 | +// ^^^^ meta.type |
| 133 | +// ^^^ support.type.any |
| 134 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 135 | + |
| 136 | + declare var c: any; |
| 137 | +// ^^^^^^^ storage.modifier |
| 138 | +// ^^^ keyword.declaration |
| 139 | +// ^ meta.binding.name variable.other.readwrite |
| 140 | +// ^ punctuation.separator.type |
| 141 | +// ^^^^ meta.type |
| 142 | +// ^^^ support.type.any |
| 143 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 144 | + |
| 145 | + declare function g(x: any): any; |
| 146 | +// ^^^^^^^ storage.modifier |
| 147 | +// ^^^^^^^^^^^^^^^^^^^^^^^ meta.function |
| 148 | +// ^^^^^^^^ keyword.declaration.function |
| 149 | +// ^ entity.name.function |
| 150 | +// ^^^^^^^^ meta.function.parameters |
| 151 | +// ^ punctuation.section.group.begin |
| 152 | +// ^ meta.binding.name variable.parameter.function |
| 153 | +// ^ punctuation.separator.type |
| 154 | +// ^^^^ meta.type |
| 155 | +// ^^^ support.type.any |
| 156 | +// ^ punctuation.section.group.end |
| 157 | +// ^ punctuation.separator.type |
| 158 | +// ^^^^ meta.type |
| 159 | +// ^^^ support.type.any |
| 160 | +// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty |
| 161 | + |
| 162 | + declare class D {} |
| 163 | +// ^^^^^^^ storage.modifier |
| 164 | +// ^^^^^^^^^^ meta.class |
| 165 | +// ^^^^^ keyword.declaration.class |
| 166 | +// ^ entity.name.class |
| 167 | +// ^^ meta.block |
| 168 | +// ^ punctuation.section.block.begin |
| 169 | +// ^ punctuation.section.block.end |
| 170 | + |
| 171 | + declare namespace M {} |
| 172 | +// ^^^^^^^ storage.modifier |
| 173 | +// ^^^^^^^^^^^^^^ meta.namespace |
| 174 | +// ^^^^^^^^^ keyword.declaration |
| 175 | +// ^ entity.name.namespace |
| 176 | +// ^^ meta.block |
| 177 | +// ^ punctuation.section.block.begin |
| 178 | +// ^ punctuation.section.block.end |
| 179 | + |
| 180 | + declare module 'module' {} |
| 181 | +// ^^^^^^^ storage.modifier |
| 182 | +// ^^^^^^^^^^^^^^^^^^ meta.module |
| 183 | +// ^^^^^^ keyword.declaration.module |
| 184 | +// ^^^^^^^^ meta.string string.quoted.single |
| 185 | +// ^^ meta.block |
0 commit comments