소스 검색

Merge a780097c5c into 8b5b49eb19

pull/366/merge
Dappster 3 일 전
committed by GitHub
부모
커밋
f58518c293
No known key found for this signature in database GPG 키 ID: B5690EEEBB952194
1개의 변경된 파일16개의 추가작업 그리고 6개의 파일을 삭제
  1. +16
    -6
      grammar.js

+ 16
- 6
grammar.js 파일 보기

@ -103,6 +103,7 @@ module.exports = grammar(C, {
[$.field_expression, $.template_method, $.template_type],
[$.field_expression, $.template_method],
[$.qualified_field_identifier, $.template_method, $.template_type],
[$._declaration_modifiers, $.friend_declaration],
[$.type_specifier, $.template_type, $.template_function, $.expression],
[$.splice_type_specifier, $.splice_expression],
],
@ -655,6 +656,7 @@ module.exports = grammar(C, {
pure_virtual_clause: _ => seq('=', /0/, ';'),
friend_declaration: $ => seq(
optional($.attribute_declaration),
optional('constexpr'),
'friend',
choice(
@ -930,12 +932,20 @@ module.exports = grammar(C, {
if_statement: $ => prec.right(seq(
'if',
optional('constexpr'),
field('condition', $.condition_clause),
field('consequence', $.statement),
optional(field('alternative', $.else_clause)),
)),
choice(
seq(
optional('constexpr'),
field('condition', $.condition_clause),
field('consequence', $.statement),
),
seq(
optional('!'),
'consteval',
field('consequence', $.compound_statement),
),
),
optional(field('alternative', $.else_clause)),
)),
// Using prec(1) instead of prec.dynamic(1) causes issues with the
// range loop's declaration specifiers if `int` is passed in, it'll
// always prefer the standard for loop and give us a parse error.

불러오는 중...
취소
저장