Fix a few missing commas and indentation

This commit is contained in:
Alex Dima 2017-06-08 15:33:52 +02:00
parent c71ca222d3
commit bd847cb2a0
2 changed files with 24 additions and 24 deletions

View file

@ -90,7 +90,7 @@ export var language = <ILanguage> {
// delimiters and operators // delimiters and operators
[/}/, { cases: { [/}/, { cases: {
'$S2==interpolatedstring' : { token: 'string.quote', next: '@pop' } '$S2==interpolatedstring' : { token: 'string.quote', next: '@pop' }
'$S2==litinterpstring' : { token: 'string.quote', next: '@pop' } , '$S2==litinterpstring' : { token: 'string.quote', next: '@pop' }
, '@default' : '@brackets' } }], , '@default' : '@brackets' } }],
[/[{}()\[\]]/, '@brackets'], [/[{}()\[\]]/, '@brackets'],
[/[<>](?!@symbols)/, '@brackets'], [/[<>](?!@symbols)/, '@brackets'],
@ -154,14 +154,14 @@ export var language = <ILanguage> {
[/"/, { token: 'string.quote', next: '@pop' } ] [/"/, { token: 'string.quote', next: '@pop' } ]
], ],
litinterpstring: [ litinterpstring: [
[/[^"{]+/, 'string'], [/[^"{]+/, 'string'],
[/""/, 'string.escape'], [/""/, 'string.escape'],
[/{{/, 'string.escape'], [/{{/, 'string.escape'],
[/}}/, 'string.escape'], [/}}/, 'string.escape'],
[/{/, { token: 'string.quote', next: 'root.litinterpstring' } ], [/{/, { token: 'string.quote', next: 'root.litinterpstring' } ],
[/"/, { token: 'string.quote', next: '@pop' } ] [/"/, { token: 'string.quote', next: '@pop' } ]
], ],
interpolatedstring: [ interpolatedstring: [
[/[^\\"{]+/, 'string'], [/[^\\"{]+/, 'string'],

View file

@ -742,24 +742,24 @@ testTokenization('csharp', [
{ startIndex: 7, type: 'delimiter.cs' } { startIndex: 7, type: 'delimiter.cs' }
]}], ]}],
[{ [{
line: 'x = $@"verbatim {interpolated} string{{}}"" ";', line: 'x = $@"verbatim {interpolated} string{{}}"" ";',
tokens: [ tokens: [
{ startIndex: 0, type: "identifier.cs" } { startIndex: 0, type: "identifier.cs" },
{ startIndex: 1, type: "" } { startIndex: 1, type: "" },
{ startIndex: 2, type: "delimiter.cs" } { startIndex: 2, type: "delimiter.cs" },
{ startIndex: 3, type: "" } { startIndex: 3, type: "" },
{ startIndex: 4, type: "string.quote.cs" } { startIndex: 4, type: "string.quote.cs" },
{ startIndex: 7, type: "string.cs" } { startIndex: 7, type: "string.cs" },
{ startIndex: 16, type: "string.quote.cs" } { startIndex: 16, type: "string.quote.cs" },
{ startIndex: 17, type: "identifier.cs" } { startIndex: 17, type: "identifier.cs" },
{ startIndex: 29, type: "string.quote.cs" } { startIndex: 29, type: "string.quote.cs" },
{ startIndex: 30, type: "string.cs" } { startIndex: 30, type: "string.cs" },
{ startIndex: 37, type: "string.escape.cs" } { startIndex: 37, type: "string.escape.cs" },
{ startIndex: 39, type: "string.cs" } { startIndex: 39, type: "string.cs" },
{ startIndex: 41, type: "string.escape.cs" } { startIndex: 41, type: "string.escape.cs" },
{ startIndex: 43, type: "string.cs" } { startIndex: 43, type: "string.cs" },
{ startIndex: 44, type: "string.quote.cs" } { startIndex: 44, type: "string.quote.cs" },
{ startIndex: 45, type: "delimiter.cs" } { startIndex: 45, type: "delimiter.cs" },
]}], ]}],
]); ]);