Defined postfixNodes for LPAREN and RPAREN

This commit is contained in:
2024-12-09 01:05:47 -05:00
parent 20fbd20994
commit f5eb9c8218

View File

@@ -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
}