@ -911,7 +911,7 @@ module.exports = grammar({
) ,
new _command _definition : $ =>
choice ( $ . _new _command _definition , $ . _newer _command _definition ),
choice ( $ . _new _command _definition , $ . _newer _command _definition , $ . _new _command _copy ),
_new _command _definition : $ =>
seq (
@ -941,25 +941,37 @@ module.exports = grammar({
) ,
_newer _command _definition : $ =>
prec . right (
seq (
field (
'command' ,
choice (
'\\NewDocumentCommand' ,
'\\RenewDocumentCommand' ,
'\\ProvideDocumentCommand' ,
'\\DeclareDocumentCommand' ,
'\\NewExpandableDocumentCommand' ,
'\\RenewExpandableDocumentCommand' ,
'\\ProvideExpandableDocumentCommand' ,
'\\DeclareExpandableDocumentCommand' ,
) ,
seq (
field (
'command' ,
choice (
'\\NewDocumentCommand' ,
'\\RenewDocumentCommand' ,
'\\ProvideDocumentCommand' ,
'\\DeclareDocumentCommand' ,
'\\NewExpandableDocumentCommand' ,
'\\RenewExpandableDocumentCommand' ,
'\\ProvideExpandableDocumentCommand' ,
'\\DeclareExpandableDocumentCommand' ,
) ,
) ,
field ( 'declaration' , choice ( $ . curly _group _command _name , $ . command _name ) ) ,
field ( 'spec' , $ . curly _group _spec ) ,
field ( 'implementation' , $ . curly _group ) ,
) ,
_new _command _copy : $ =>
seq (
field (
'command' ,
choice (
'\\NewCommandCopy' ,
'\\RenewCommandCopy' ,
'\\DeclareCommandCopy' ,
) ,
field ( 'declaration' , choice ( $ . curly _group _command _name , $ . command _name ) ) ,
field ( 'spec' , $ . curly _group _spec ) ,
field ( 'implementation' , $ . curly _group ) ,
) ,
field ( 'declaration' , choice ( $ . curly _group _command _name , $ . command _name ) ) ,
field ( 'implementation' , $ . curly _group _command _name ) ,
) ,
old _command _definition : $ =>
@ -989,7 +1001,7 @@ module.exports = grammar({
) ,
environment _definition : $ =>
choice ( $ . _environment _definition , $ . _newer _environment _definition ),
choice ( $ . _environment _definition , $ . _newer _environment _definition , $ . _new _environment _copy ),
_environment _definition : $ =>
seq (
@ -1023,6 +1035,20 @@ module.exports = grammar({
field ( 'end' , $ . curly _group _impl ) ,
) ,
_new _environment _copy : $ =>
seq (
field (
'command' ,
choice (
'\\NewEnvironmentCopy' ,
'\\RenewEnvironmentCopy' ,
'\\DeclareEnvironmentCopy' ,
) ,
) ,
field ( 'name' , $ . curly _group _text ) ,
field ( 'name' , $ . curly _group _text ) ,
) ,
glossary _entry _definition : $ =>
seq (
field ( 'command' , '\\newglossaryentry' ) ,