Skip to content

Commit e47e1c2

Browse files
author
Valentin Touzeau
committed
Adding support for alignas type qualifier
1 parent 82fb86a commit e47e1c2

File tree

5 files changed

+80458
-78000
lines changed

5 files changed

+80458
-78000
lines changed

grammar.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ module.exports = grammar({
555555
'__thread',
556556
),
557557

558-
type_qualifier: _ => choice(
558+
type_qualifier: $ => choice(
559559
'const',
560560
'constexpr',
561561
'volatile',
@@ -565,6 +565,14 @@ module.exports = grammar({
565565
'_Atomic',
566566
'_Noreturn',
567567
'noreturn',
568+
$.alignas_qualifier,
569+
),
570+
571+
alignas_qualifier: $ => seq(
572+
choice('alignas', '_Alignas'),
573+
'(',
574+
choice($._expression, $.type_descriptor),
575+
')',
568576
),
569577

570578
_type_specifier: $ => choice(

src/grammar.json

+43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

+38-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)