Skip to content

Commit f96511f

Browse files
committed
Rename DOT to PROPERTY_ACCESS_OPERATOR
1 parent c7eafef commit f96511f

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/lexer/Tokenizer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ export default class Tokenizer {
189189
]),
190190
},
191191
{ type: TokenType.ASTERISK, regex: /[*]/uy },
192-
{ type: TokenType.DOT, regex: regex.operator(['.', ...(cfg.propertyAccessOperators ?? [])]) },
192+
{
193+
type: TokenType.PROPERTY_ACCESS_OPERATOR,
194+
regex: regex.operator(['.', ...(cfg.propertyAccessOperators ?? [])]),
195+
},
193196
]);
194197
}
195198

src/lexer/token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export enum TokenType {
2828
OPERATOR = 'OPERATOR',
2929
COMMA = 'COMMA',
3030
ASTERISK = 'ASTERISK', // *
31-
DOT = 'DOT', // . (or .. in Transact-SQL)
31+
PROPERTY_ACCESS_OPERATOR = 'PROPERTY_ACCESS_OPERATOR', // Usually "."
3232
OPEN_PAREN = 'OPEN_PAREN',
3333
CLOSE_PAREN = 'CLOSE_PAREN',
3434
LINE_COMMENT = 'LINE_COMMENT',

src/parser/grammar.ne

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ square_brackets -> "[" free_form_sql:* "]" {%
256256
})
257257
%}
258258

259-
property_access -> atomic_expression _ %DOT _ (identifier | array_subscript | all_columns_asterisk | parameter) {%
259+
property_access -> atomic_expression _ %PROPERTY_ACCESS_OPERATOR _ (identifier | array_subscript | all_columns_asterisk | parameter) {%
260260
// Allowing property to be <array_subscript> is currently a hack.
261261
// A better way would be to allow <property_access> on the left side of array_subscript,
262262
// but we currently can't do that because of another hack that requires

0 commit comments

Comments
 (0)