Skip to content

Commit

Permalink
Adding support for alignas type qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Touzeau authored and amaanq committed May 31, 2024
1 parent b857077 commit 0410733
Show file tree
Hide file tree
Showing 5 changed files with 80,462 additions and 78,003 deletions.
10 changes: 9 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ module.exports = grammar({
'__thread',
),

type_qualifier: _ => choice(
type_qualifier: $ => choice(
'const',
'constexpr',
'volatile',
Expand All @@ -565,6 +565,14 @@ module.exports = grammar({
'_Atomic',
'_Noreturn',
'noreturn',
$.alignas_qualifier,
),

alignas_qualifier: $ => seq(
choice('alignas', '_Alignas'),
'(',
choice($._expression, $.type_descriptor),
')',
),

_type_specifier: $ => choice(
Expand Down
43 changes: 43 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 38 additions & 1 deletion src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0410733

Please sign in to comment.