瀏覽代碼

Merge 92fda59cbc into 8b5b49eb19

pull/362/merge
Dappster 3 週之前
committed by GitHub
父節點
當前提交
e9a9f16c92
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 14 行新增6 行删除
  1. +14
    -6
      grammar.js

+ 14
- 6
grammar.js 查看文件

@ -930,12 +930,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.

Loading…
取消
儲存