Add definition for identifier.quote (to match dax syntax)

pull/2748/head
Matt Masson 7 years ago
parent 56df5af3e5
commit 985b1bdc11

@ -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…
Cancel
Save