fixed macro for brackets

This commit is contained in:
Sergey Parilin 2019-05-15 12:34:48 +03:00
parent 64ab5ab10d
commit d77175ce28
2 changed files with 3 additions and 3 deletions

View file

@ -245,8 +245,8 @@ use self::SyntaxKind::*;
macro_rules! T {
(;) => { $crate::SyntaxKind::SEMI };
(,) => { $crate::SyntaxKind::COMMA };
(() => { $crate::SyntaxKind::L_PAREN };
()) => { $crate::SyntaxKind::R_PAREN };
('(') => { $crate::SyntaxKind::L_PAREN };
(')') => { $crate::SyntaxKind::R_PAREN };
('{') => { $crate::SyntaxKind::L_CURLY };
('}') => { $crate::SyntaxKind::R_CURLY };
('[') => { $crate::SyntaxKind::L_BRACK };

View file

@ -36,7 +36,7 @@ use self::SyntaxKind::*;
#[macro_export]
macro_rules! T {
{%- for t in concat(a=single_byte_tokens, b=multi_byte_tokens) %}
{%- if t.0 == '{' or t.0 == '}' or t.0 == '[' or t.0 == ']' %}
{%- if t.0 == '{' or t.0 == '}' or t.0 == '[' or t.0 == ']' or t.0 == '(' or t.0 == ')' %}
('{{t.0}}') => { $crate::SyntaxKind::{{t.1}} };
{%- else %}
({{t.0}}) => { $crate::SyntaxKind::{{t.1}} };