TypeScript-TmLanguage/tests/baselines/Issue124.txt

92 строки
4.1 KiB
Plaintext

original file
-----------------------------------
/*
Solving Issue #124, #80, #81
Adding capability of ternary strings.
*/
let a = ^^true ? ^^true : ^^true;
let b = ^^true ? ^^true : ^^`^^this is ^^${} highlighted`
let c = ^^true ? ^^`^^hello` : ^^`^^this ${DEPENDENCY_SEPARATOR}${moduleName} is highlighted`;
var ^^newVar = ^^a ^^? ^^(b == `hello`) : ^^true;
var ^^debArch = ^^arch ^^=== ^^'x64' ^^? ^^'amd64' ^^: ^^'i386';
/*
^^Comment
*/
-----------------------------------
Grammar: TypeScript.tmLanguage
-----------------------------------
>/*
> Solving Issue #124, #80, #81
> Adding capability of ternary strings.
>*/
>
>let a = true ? true : true;
^^^^
[6, 9]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
^^^^
[6, 16]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
^^^^
[6, 23]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
>let b = true ? true : `this is ${} highlighted`
^^^^
[7, 9]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
^^^^
[7, 16]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
^
[7, 23]: source.ts meta.var.expr.ts string.template.ts punctuation.definition.string.template.begin.ts
^^^^^^^^
[7, 24]: source.ts meta.var.expr.ts string.template.ts
^^
[7, 32]: source.ts meta.var.expr.ts string.template.ts meta.template.expression.ts punctuation.definition.template-expression.begin.ts
>let c = true ? `hello` : `this ${DEPENDENCY_SEPARATOR}${moduleName} is highlighted`;
^^^^
[8, 9]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
^
[8, 16]: source.ts meta.var.expr.ts string.template.ts punctuation.definition.string.template.begin.ts
^^^^^
[8, 17]: source.ts meta.var.expr.ts string.template.ts
^
[8, 26]: source.ts meta.var.expr.ts string.template.ts punctuation.definition.string.template.begin.ts
^^^^^
[8, 27]: source.ts meta.var.expr.ts string.template.ts
>
>var newVar = a ? (b == `hello`) : true;
^^^^^^
[10, 5]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^
[10, 14]: source.ts meta.var.expr.ts variable.other.readwrite.ts
^
[10, 16]: source.ts meta.var.expr.ts keyword.operator.ternary.ts
^
[10, 18]: source.ts meta.var.expr.ts meta.brace.round.ts
^^^^
[10, 35]: source.ts meta.var.expr.ts constant.language.boolean.true.ts
>
>var debArch = arch === 'x64' ? 'amd64' : 'i386';
^^^^^^^
[12, 5]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^^^^
[12, 15]: source.ts meta.var.expr.ts variable.other.readwrite.ts
^^^
[12, 20]: source.ts meta.var.expr.ts keyword.operator.comparison.ts
^
[12, 24]: source.ts meta.var.expr.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^
[12, 30]: source.ts meta.var.expr.ts keyword.operator.ternary.ts
^
[12, 32]: source.ts meta.var.expr.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^
[12, 40]: source.ts meta.var.expr.ts keyword.operator.ternary.ts
^
[12, 42]: source.ts meta.var.expr.ts string.quoted.single.ts punctuation.definition.string.begin.ts
>
>/*
> Comment
^^^^^^^^^
[15, 2]: source.ts comment.block.ts
>*/