mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 01:38:13 +00:00
fixed macro for brackets
This commit is contained in:
parent
64ab5ab10d
commit
d77175ce28
2 changed files with 3 additions and 3 deletions
|
@ -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 };
|
||||
|
|
|
@ -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}} };
|
||||
|
|
Loading…
Reference in a new issue