Add more tests for hex and binary integer literals

This commit is contained in:
Sebastian Pahnke 2018-10-05 17:29:11 +02:00
parent 79ad5abdb3
commit 623dbc1acc
2 changed files with 42 additions and 0 deletions

View file

@ -375,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 // Regular Expressions
[{ [{
line: '//', line: '//',

View file

@ -375,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 // Regular Expressions
[{ [{
line: '//', line: '//',