Merge pull request #10 from nicot/master

Go: add raw string literal syntax
pull/2748/head
Alexandru Dima 8 years ago committed by GitHub
commit ab254ceffc

@ -126,6 +126,7 @@ export var language = <ILanguage> {
// strings
[/"([^"\\]|\\.)*$/, 'string.invalid' ], // non-teminated string
[/"/, 'string', '@string' ],
[/`/, "string", "@rawstring"],
// characters
[/'[^\\']'/, 'string'],
@ -162,5 +163,10 @@ export var language = <ILanguage> {
[/\\./, 'string.escape.invalid'],
[/"/, 'string', '@pop' ]
],
rawstring: [
[/[^\`]/, "string"],
[/`/, "string", "@pop"]
],
},
};

@ -1163,5 +1163,11 @@ testTokenization('go', [
line: '}',
tokens: [
{ startIndex: 0, type: 'delimiter.curly.go' }
]}],
[{
line: '`Hello world() ""`',
tokens: [
{ startIndex: 0, type: 'string.go' }
]}]
]);

Loading…
Cancel
Save