Add starred commands for theorem definitions

See #36
pull/511/head
Patrick Förster 2022-04-11 20:41:35 +07:00
parent b71e4928a6
commit 5afabaea0e
4 changed files with 413509 additions and 410273 deletions

@ -969,7 +969,15 @@ module.exports = grammar({
theorem_definition: $ => theorem_definition: $ =>
prec.right( prec.right(
seq( seq(
field('command', choice('\\newtheorem', '\\declaretheorem')), field(
'command',
choice(
'\\newtheorem',
'\\newtheorem*',
'\\declaretheorem',
'\\declaretheorem*'
)
),
optional(field('options', $.brack_group_key_value)), optional(field('options', $.brack_group_key_value)),
field('name', $.curly_group_text), field('name', $.curly_group_text),
optional( optional(

8
src/grammar.json vendored

@ -4444,9 +4444,17 @@
"type": "STRING", "type": "STRING",
"value": "\\newtheorem" "value": "\\newtheorem"
}, },
{
"type": "STRING",
"value": "\\newtheorem*"
},
{ {
"type": "STRING", "type": "STRING",
"value": "\\declaretheorem" "value": "\\declaretheorem"
},
{
"type": "STRING",
"value": "\\declaretheorem*"
} }
] ]
} }

@ -6055,9 +6055,17 @@
"type": "\\declaretheorem", "type": "\\declaretheorem",
"named": false "named": false
}, },
{
"type": "\\declaretheorem*",
"named": false
},
{ {
"type": "\\newtheorem", "type": "\\newtheorem",
"named": false "named": false
},
{
"type": "\\newtheorem*",
"named": false
} }
] ]
}, },
@ -6982,6 +6990,10 @@
"type": "\\declaretheorem", "type": "\\declaretheorem",
"named": false "named": false
}, },
{
"type": "\\declaretheorem*",
"named": false
},
{ {
"type": "\\def", "type": "\\def",
"named": false "named": false
@ -7242,6 +7254,10 @@
"type": "\\newtheorem", "type": "\\newtheorem",
"named": false "named": false
}, },
{
"type": "\\newtheorem*",
"named": false
},
{ {
"type": "\\nocite", "type": "\\nocite",
"named": false "named": false

823748
src/parser.c vendored

File diff suppressed because it is too large Load Diff