|
| 1 | +original file |
| 2 | +----------------------------------- |
| 3 | +function f(): (x: number) => any { |
| 4 | + return true ? x => f() : x => 0; |
| 5 | +} |
| 6 | +const x = 0; // no highlight in rest of file |
| 7 | +----------------------------------- |
| 8 | + |
| 9 | +Grammar: TypeScript.tmLanguage |
| 10 | +----------------------------------- |
| 11 | +>function f(): (x: number) => any { |
| 12 | + ^^^^^^^^ |
| 13 | + source.ts meta.function.ts storage.type.function.ts |
| 14 | + ^ |
| 15 | + source.ts meta.function.ts |
| 16 | + ^ |
| 17 | + source.ts meta.function.ts meta.definition.function.ts entity.name.function.ts |
| 18 | + ^ |
| 19 | + source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts |
| 20 | + ^ |
| 21 | + source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts |
| 22 | + ^ |
| 23 | + source.ts meta.function.ts meta.return.type.ts keyword.operator.type.annotation.ts |
| 24 | + ^ |
| 25 | + source.ts meta.function.ts meta.return.type.ts |
| 26 | + ^ |
| 27 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts |
| 28 | + ^ |
| 29 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts variable.parameter.ts |
| 30 | + ^ |
| 31 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts keyword.operator.type.annotation.ts |
| 32 | + ^ |
| 33 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts |
| 34 | + ^^^^^^ |
| 35 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts |
| 36 | + ^ |
| 37 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts |
| 38 | + ^ |
| 39 | + source.ts meta.function.ts meta.return.type.ts |
| 40 | + ^^ |
| 41 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.return.ts storage.type.function.arrow.ts |
| 42 | + ^ |
| 43 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.return.ts |
| 44 | + ^^^ |
| 45 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.return.ts support.type.primitive.ts |
| 46 | + ^ |
| 47 | + source.ts meta.function.ts meta.return.type.ts meta.type.function.return.ts |
| 48 | + ^ |
| 49 | + source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts |
| 50 | + ^^ |
| 51 | + source.ts meta.function.ts meta.block.ts |
| 52 | +> return true ? x => f() : x => 0; |
| 53 | + ^^^^ |
| 54 | + source.ts meta.function.ts meta.block.ts |
| 55 | + ^^^^^^ |
| 56 | + source.ts meta.function.ts meta.block.ts keyword.control.flow.ts |
| 57 | + ^ |
| 58 | + source.ts meta.function.ts meta.block.ts |
| 59 | + ^^^^ |
| 60 | + source.ts meta.function.ts meta.block.ts constant.language.boolean.true.ts |
| 61 | + ^ |
| 62 | + source.ts meta.function.ts meta.block.ts |
| 63 | + ^ |
| 64 | + source.ts meta.function.ts meta.block.ts keyword.operator.ternary.ts |
| 65 | + ^ |
| 66 | + source.ts meta.function.ts meta.block.ts |
| 67 | + ^ |
| 68 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts variable.parameter.ts |
| 69 | + ^ |
| 70 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts |
| 71 | + ^^ |
| 72 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts storage.type.function.arrow.ts |
| 73 | + ^ |
| 74 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts |
| 75 | + ^ |
| 76 | + source.ts meta.function.ts meta.block.ts meta.function-call.ts entity.name.function.ts |
| 77 | + ^ |
| 78 | + source.ts meta.function.ts meta.block.ts meta.brace.round.ts |
| 79 | + ^ |
| 80 | + source.ts meta.function.ts meta.block.ts meta.brace.round.ts |
| 81 | + ^ |
| 82 | + source.ts meta.function.ts meta.block.ts |
| 83 | + ^ |
| 84 | + source.ts meta.function.ts meta.block.ts keyword.operator.ternary.ts |
| 85 | + ^ |
| 86 | + source.ts meta.function.ts meta.block.ts |
| 87 | + ^ |
| 88 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts variable.parameter.ts |
| 89 | + ^ |
| 90 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts |
| 91 | + ^^ |
| 92 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts storage.type.function.arrow.ts |
| 93 | + ^ |
| 94 | + source.ts meta.function.ts meta.block.ts meta.arrow.ts |
| 95 | + ^ |
| 96 | + source.ts meta.function.ts meta.block.ts constant.numeric.decimal.ts |
| 97 | + ^ |
| 98 | + source.ts meta.function.ts meta.block.ts punctuation.terminator.statement.ts |
| 99 | + ^^ |
| 100 | + source.ts meta.function.ts meta.block.ts |
| 101 | +>} |
| 102 | + ^ |
| 103 | + source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts |
| 104 | + ^^ |
| 105 | + source.ts |
| 106 | +>const x = 0; // no highlight in rest of file |
| 107 | + ^^^^^ |
| 108 | + source.ts meta.var.expr.ts storage.type.ts |
| 109 | + ^ |
| 110 | + source.ts meta.var.expr.ts |
| 111 | + ^ |
| 112 | + source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts |
| 113 | + ^ |
| 114 | + source.ts meta.var.expr.ts meta.var-single-variable.expr.ts |
| 115 | + ^ |
| 116 | + source.ts meta.var.expr.ts keyword.operator.assignment.ts |
| 117 | + ^ |
| 118 | + source.ts meta.var.expr.ts |
| 119 | + ^ |
| 120 | + source.ts meta.var.expr.ts constant.numeric.decimal.ts |
| 121 | + ^ |
| 122 | + source.ts punctuation.terminator.statement.ts |
| 123 | + ^ |
| 124 | + source.ts |
| 125 | + ^^ |
| 126 | + source.ts comment.line.double-slash.ts punctuation.definition.comment.ts |
| 127 | + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 128 | + source.ts comment.line.double-slash.ts |
0 commit comments