mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +01:00
Merge pull request #49 from spahnke/octal
This commit is contained in:
commit
5428f8a943
3 changed files with 71 additions and 1 deletions
|
|
@ -346,6 +346,20 @@ testTokenization('javascript', [
|
|||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0o123',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.octal.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0O123',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.octal.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0x',
|
||||
tokens: [
|
||||
|
|
@ -361,6 +375,27 @@ testTokenization('javascript', [
|
|||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0X123',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.hex.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0b101',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.binary.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0B101',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.binary.js' }
|
||||
]
|
||||
}],
|
||||
|
||||
// Regular Expressions
|
||||
[{
|
||||
line: '//',
|
||||
|
|
|
|||
|
|
@ -346,6 +346,20 @@ testTokenization('typescript', [
|
|||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0o123',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.octal.ts' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0O123',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.octal.ts' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0x',
|
||||
tokens: [
|
||||
|
|
@ -361,6 +375,27 @@ testTokenization('typescript', [
|
|||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0X123',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.hex.ts' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0b101',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.binary.ts' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: '0B101',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'number.binary.ts' }
|
||||
]
|
||||
}],
|
||||
|
||||
// Regular Expressions
|
||||
[{
|
||||
line: '//',
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ export const language = {
|
|||
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)/, 'number.hex'],
|
||||
[/0(@octaldigits)/, 'number.octal'],
|
||||
[/0[oO]?(@octaldigits)/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)/, 'number.binary'],
|
||||
[/(@digits)/, 'number'],
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue