mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
This commit is contained in:
parent
701a5b4584
commit
711d51d9fc
4 changed files with 112 additions and 1 deletions
|
|
@ -430,6 +430,47 @@ testTokenization('javascript', [
|
|||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: 'x = /foo/.test(\'\')',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'identifier.js' },
|
||||
{ startIndex: 1, type: '' },
|
||||
{ startIndex: 2, type: 'delimiter.js' },
|
||||
{ startIndex: 3, type: '' },
|
||||
{ startIndex: 4, type: 'regexp.js' },
|
||||
{ startIndex: 9, type: 'delimiter.js' },
|
||||
{ startIndex: 10, type: 'identifier.js' },
|
||||
{ startIndex: 14, type: 'delimiter.parenthesis.js' },
|
||||
{ startIndex: 15, type: 'string.js' },
|
||||
{ startIndex: 17, type: 'delimiter.parenthesis.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: 'x = 1 + f(2 / 3, /foo/)',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'identifier.js' },
|
||||
{ startIndex: 1, type: '' },
|
||||
{ startIndex: 2, type: 'delimiter.js' },
|
||||
{ startIndex: 3, type: '' },
|
||||
{ startIndex: 4, type: 'number.js' },
|
||||
{ startIndex: 5, type: '' },
|
||||
{ startIndex: 6, type: 'delimiter.js' },
|
||||
{ startIndex: 7, type: '' },
|
||||
{ startIndex: 8, type: 'identifier.js' },
|
||||
{ startIndex: 9, type: 'delimiter.parenthesis.js' },
|
||||
{ startIndex: 10, type: 'number.js' },
|
||||
{ startIndex: 11, type: '' },
|
||||
{ startIndex: 12, type: 'delimiter.js' },
|
||||
{ startIndex: 13, type: '' },
|
||||
{ startIndex: 14, type: 'number.js' },
|
||||
{ startIndex: 15, type: 'delimiter.js' },
|
||||
{ startIndex: 16, type: '' },
|
||||
{ startIndex: 17, type: 'regexp.js' },
|
||||
{ startIndex: 22, type: 'delimiter.parenthesis.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: 'a /ads/ b;',
|
||||
tokens: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue