typle access expression added

This commit is contained in:
ProgramSnail 2023-07-18 11:03:11 +03:00
parent befa2f0395
commit 209ef22e0f
3 changed files with 27 additions and 1 deletions

View file

@ -141,6 +141,8 @@ module.exports = grammar({
access: $ => seq($._scoped_expression, '[', $._super_expression, ']'),
tuple_access: $ => seq($._scoped_expression, '.', $.number_literal),
loop_control: $ => choice('break', 'continue'),
reference: $ => prec(-1, seq(choice(choice('<>', 'ref'), choice('<-', 'in')), $._scoped_expression)),
@ -204,6 +206,7 @@ module.exports = grammar({
$.placeholder,
$.name_definition,
$.access,
$.tuple_access,
$.loop_control,
$.reference,
$.suffix_expression,