Changes
3 changed files (+113/-52)
-
-
@@ -84,18 +84,16 @@ $.ternary_expression,$.assignment_expression ), member_access_expression: $ => prec.right( seq( optional(seq( choice( $.this_access, $.member_access_expression, seq('(', $._expression, ')') ), choice('.', '?.', '->'), )), $.identifier ), member_access_expression: $ => seq( optional(seq( choice( $.this_access, $.member_access_expression, seq('(', $._expression, ')') ), choice('.', '?.', '->'), )), $.identifier ), argument: $ => choice(
-
@@ -105,16 +103,14 @@ $._expression,seq($.identifier, ':', $._expression) ), method_call_expression: $ => prec.right(15, seq( choice( seq('(', $._expression, ')'), seq($.member_access_expression, optional($.type_arguments)) ), '(', optional(seq($.argument, repeat(seq(',', $.argument)))), ')' ) method_call_expression: $ => seq( choice( seq('(', $._expression, ')'), seq($.member_access_expression, optional($.type_arguments)) ), '(', optional(seq($.argument, repeat(seq(',', $.argument)))), ')' ), postfix_expression: $ => prec.left(14, seq($._expression, choice('++', '--'))),
-
@@ -192,28 +188,26 @@ $.template_string,$.verbatim_string ), type: $ => prec.right( choice( seq('void', repeat('*')), seq( optional('dynamic'), optional('unowned'), optional('weak'), '(', $.type, ')', repeat1($.array_type) ), seq( optional('dynamic'), optional('unowned'), optional('weak'), $.symbol, optional($.type_arguments), optional('*'), optional('?'), repeat($.array_type) ) type: $ => choice( seq('void', repeat('*')), seq( optional('dynamic'), optional('unowned'), optional('weak'), '(', $.type, ')', repeat1($.array_type) ), seq( optional('dynamic'), optional('unowned'), optional('weak'), $.symbol, optional($.type_arguments), optional('*'), optional('?'), repeat($.array_type) ) ),
-
@@ -224,13 +218,11 @@ repeat(seq(',', $.type)),'>' ), array_type: $ => prec.right( seq( '[', optional($.array_size), ']', optional('?') ) array_type: $ => seq( '[', optional($.array_size), ']', optional('?') ), array_size: $ => seq(
-
@@ -420,6 +412,9 @@ [$.member_declaration_modifier, $.class_declaration], // because both can start with 'class'[$.member_declaration_modifier, $.type_declaration_modifier], // because both share 'extern' [$.member_declaration_modifier, $.object_creation_expression], // because OCEs can appear in the main block [$.symbol, $.member_access_expression], // disambiguate member access and static cast expressions [$.type], // disambiguate between 'X as <type *> ...' and '(X as <type>)* ...' [$.array_type], // when 'X[]? ...' could also be '(X[]) ? ...' [$._expression, $.method_call_expression], // 'X <' may be start of comparison or method call [$.initializer, $.block], // because {} is ambiguous in statement-expression contexts ],
-
-
-
@@ -7,7 +7,9 @@ (access_modifier) @keyword(attribute) @attribute (method_declaration (symbol (identifier) @function)) (creation_method_declaration (symbol (identifier) @constructor)) (method_call_expression (member_access_expression (identifier) @function)) (parameter (identifier) @variable.parameter) (property_declaration (symbol (identifier) @property)) (this_access) @variable.builtin (boolean) @constant.builtin (character) @constant
-
@@ -47,3 +49,53 @@ "unowned""virtual" "weak" ] @keyword [ "=" "+" "+=" "-" "-=" "|" "|=" "&" "&=" "^" "^=" "/" "/=" "*" "*=" "%" "%=" "<<" "<<=" ">>" ">>=" "." "?." "->" "!" "~" "??" "?" ":" "<" ">" "||" "&&" ] @operator [ "," ";" ] @punctuation.delimiter [ "(" ")" "{" "}" "[" "]" ] @punctuation.bracket
-
-
-
@@ -6,6 +6,8 @@ void main() {3 + b.c; a in b(); 3 = 3; x.y.z(); (3 + 1).to_string(); } ---
-
@@ -24,4 +26,16 @@ (member_access_expression (identifier))(method_call_expression (member_access_expression (identifier)))) (assignment_expression (literal (integer)) (literal (integer))))))) (literal (integer))) (method_call_expression (member_access_expression (member_access_expression (member_access_expression (identifier)) (identifier)) (identifier))) (method_call_expression (member_access_expression (arithmetic_expression (literal (integer)) (literal (integer))) (identifier)))))))
-