Defined postfixNodes for LPAREN and RPAREN

master
Aadhavan Srinivasan 2 weeks ago
parent 20fbd20994
commit f5eb9c8218

@ -104,6 +104,14 @@ func newPostfixNode(contents ...rune) postfixNode {
to_return.nodetype = CHARACTER
}
to_return.contents = append(to_return.contents, contents...)
// Special cases for LPAREN and RPAREN - they have special characters defined for them
if to_return.nodetype == LPAREN {
to_return.contents = []rune{LPAREN_CHAR}
}
if to_return.nodetype == RPAREN {
to_return.contents = []rune{RPAREN_CHAR}
}
}
return to_return
}

Loading…
Cancel
Save