Currently, \hat{A} will place A in a ParseNode::Group, and \hat A will simply place a ParseNode::Symbol in the nucleus of the ParseNode::Accent.
As a macro argument, the opening and closing braces should be transparent to the processing of ParseNode::Accent. In particular, this will give false positives to nucleus.is_symbol when processing superscripts.
It may be worth considering changing the nucleus field of an Accent to a Vec<ParseNode> instead.
Currently,
\hat{A}
will placeA
in aParseNode::Group
, and\hat A
will simply place aParseNode::Symbol
in the nucleus of theParseNode::Accent
.As a macro argument, the opening and closing braces should be transparent to the processing of
ParseNode::Accent
. In particular, this will give false positives tonucleus.is_symbol
when processing superscripts.It may be worth considering changing the
nucleus
field of anAccent
to aVec<ParseNode>
instead.