diff --git a/postfixNode.go b/postfixNode.go index 561b7a6..ed60b80 100644 --- a/postfixNode.go +++ b/postfixNode.go @@ -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 }