mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Add definition for identifier.quote (to match dax syntax)
This commit is contained in:
parent
56df5af3e5
commit
985b1bdc11
2 changed files with 6 additions and 6 deletions
|
|
@ -79,18 +79,18 @@ testTokenization('powerquery', [
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
|
|
||||||
// Escaped Identifiers
|
// Quoted Identifiers
|
||||||
[{
|
[{
|
||||||
line: '#"Change Types"',
|
line: '#"Change Types"',
|
||||||
tokens: [
|
tokens: [
|
||||||
{ startIndex: 0, type: 'identifier.pq' }
|
{ startIndex: 0, type: 'identifier.quote.pq' }
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
|
|
||||||
[{
|
[{
|
||||||
line: '#"A B" = 1+2,',
|
line: '#"A B" = 1+2,',
|
||||||
tokens: [
|
tokens: [
|
||||||
{ startIndex: 0, type: 'identifier.pq' },
|
{ startIndex: 0, type: 'identifier.quote.pq' },
|
||||||
{ startIndex: 7, type: 'white.pq' },
|
{ startIndex: 7, type: 'white.pq' },
|
||||||
{ startIndex: 8, type: 'operator.pq' },
|
{ startIndex: 8, type: 'operator.pq' },
|
||||||
{ startIndex: 9, type: 'white.pq' },
|
{ startIndex: 9, type: 'white.pq' },
|
||||||
|
|
@ -108,7 +108,7 @@ testTokenization('powerquery', [
|
||||||
{ startIndex: 1, type: 'white.pq' },
|
{ startIndex: 1, type: 'white.pq' },
|
||||||
{ startIndex: 2, type: 'operator.pq' },
|
{ startIndex: 2, type: 'operator.pq' },
|
||||||
{ startIndex: 3, type: 'white.pq' },
|
{ startIndex: 3, type: 'white.pq' },
|
||||||
{ startIndex: 4, type: 'identifier.pq' },
|
{ startIndex: 4, type: 'identifier.quote.pq' },
|
||||||
{ startIndex: 15, type: 'operator.pq' },
|
{ startIndex: 15, type: 'operator.pq' },
|
||||||
{ startIndex: 16, type: 'white.pq' },
|
{ startIndex: 16, type: 'white.pq' },
|
||||||
{ startIndex: 17, type: 'number.pq' }
|
{ startIndex: 17, type: 'number.pq' }
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ export const language = <ILanguage>{
|
||||||
|
|
||||||
tokenizer: {
|
tokenizer: {
|
||||||
root: [
|
root: [
|
||||||
// escaped identifier
|
// quoted identifier
|
||||||
[/#"[\w \.]+"/, "identifier"],
|
[/#"[\w \.]+"/, "identifier.quote"],
|
||||||
|
|
||||||
// numbers
|
// numbers
|
||||||
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue