Wrote function to create a character node regardless of the contents of the node

This commit is contained in:
2024-10-29 10:05:01 -04:00
parent 445a7247f8
commit b8d5ea0897

@@ -47,3 +47,11 @@ func newPostfixNode(contents ...rune) postfixNode {
} }
return to_return return to_return
} }
// Creates a character node, regardless of the contents
func newPostfixCharNode(contents ...rune) postfixNode {
toReturn := postfixNode{}
toReturn.nodetype = CHARACTER
toReturn.contents = append(toReturn.contents, contents...)
return toReturn
}