mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
more tests and fixes
This commit is contained in:
parent
5bdff0c4a7
commit
70dcf9020c
2 changed files with 16 additions and 3 deletions
|
|
@ -80,4 +80,16 @@ testTokenization('abap', [
|
||||||
{ startIndex: 20, type: 'delimiter.abap' },
|
{ startIndex: 20, type: 'delimiter.abap' },
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
|
[{
|
||||||
|
line: '\'he\'\' llo\'',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'string.abap' },
|
||||||
|
]
|
||||||
|
}],
|
||||||
|
[{
|
||||||
|
line: '|hel\\|lo|',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'string.abap' },
|
||||||
|
]
|
||||||
|
}],
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ export const language = <ILanguage> {
|
||||||
[/@symbols/, { cases: { '@operators': 'operator',
|
[/@symbols/, { cases: { '@operators': 'operator',
|
||||||
'@default' : '' } } ],
|
'@default' : '' } } ],
|
||||||
|
|
||||||
[/'/, { token: 'string', bracket: '@open', next: '@string' } ],
|
[/'/, { token: 'string', bracket: '@open', next: '@stringquote' } ],
|
||||||
[/\|/, { token: 'string', bracket: '@open', next: '@stringtemplate' } ],
|
[/\|/, { token: 'string', bracket: '@open', next: '@stringtemplate' } ],
|
||||||
|
|
||||||
[/\d+/, 'number'],
|
[/\d+/, 'number'],
|
||||||
|
|
@ -95,10 +95,11 @@ export const language = <ILanguage> {
|
||||||
|
|
||||||
stringtemplate: [
|
stringtemplate: [
|
||||||
[/[^\\\|]+/, 'string'],
|
[/[^\\\|]+/, 'string'],
|
||||||
[/\|/, { token: 'string', bracket: '@close', next: '@pop' } ]
|
[/\\\|/, 'string'],
|
||||||
|
[/\|/, { token: 'string', bracket: '@close', next: '@pop' } ]
|
||||||
],
|
],
|
||||||
|
|
||||||
string: [
|
stringquote: [
|
||||||
[/[^\\']+/, 'string'],
|
[/[^\\']+/, 'string'],
|
||||||
[/'/, { token: 'string', bracket: '@close', next: '@pop' } ]
|
[/'/, { token: 'string', bracket: '@close', next: '@pop' } ]
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue