Fix curly_group_impl rule

See #36.
pull/511/head
Patrick Förster 2022-04-14 18:21:52 +07:00
parent ab9c1c59de
commit e550c23486
4 changed files with 520224 additions and 520165 deletions

@ -348,7 +348,12 @@ module.exports = grammar({
curly_group_glob_pattern: $ =>
seq('{', field('pattern', $.glob_pattern), '}'),
curly_group_impl: $ => seq('{', repeat($._text_content), '}'),
curly_group_impl: $ =>
seq(
'{',
repeat(choice($._text_content, '(', ')', '[', ']', ',', '=')),
'}'
),
curly_group_author_list: $ =>
seq(

33
src/grammar.json vendored

@ -1388,8 +1388,37 @@
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_text_content"
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_text_content"
},
{
"type": "STRING",
"value": "("
},
{
"type": "STRING",
"value": ")"
},
{
"type": "STRING",
"value": "["
},
{
"type": "STRING",
"value": "]"
},
{
"type": "STRING",
"value": ","
},
{
"type": "STRING",
"value": "="
}
]
}
},
{

1040332
src/parser.c vendored

File diff suppressed because it is too large Load Diff

@ -498,7 +498,7 @@ Let
(word))))))
================================================================================
tree-sitter-latex (Issue #36) | Paired delimiter
tree-sitter-latex (Issue #36) | Paired delimiter #1
================================================================================
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
@ -528,6 +528,21 @@ tree-sitter-latex (Issue #36) | Paired delimiter
(text
(placeholder)))))
================================================================================
tree-sitter-latex (Issue #36) | Paired delimiter #2
================================================================================
\DeclarePairedDelimiter{\foo}{(}{)}
--------------------------------------------------------------------------------
(source_file
(paired_delimiter_definition
(curly_group_command_name
(command_name))
(curly_group_impl)
(curly_group_impl)))
================================================================================
tree-sitter-latex (Issue #39) | Section with ToC entry
================================================================================