1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-28 09:35:19 +00:00

Rename nodes to more general names.

This commit is contained in:
2017-08-02 10:41:52 -07:00
parent 5de9453bec
commit 9713f24ed2
4 changed files with 13 additions and 13 deletions

View File

@@ -127,11 +127,11 @@ public class ShuntingYardParser implements Parser<Match<TokenType>>, PluginListe
TreeNode right = constructRecursive(matches);
TreeNode left = constructRecursive(matches);
if (left == null || right == null) return null;
else return new BinaryInfixNode(operator, left, right);
else return new BinaryNode(operator, left, right);
} else {
TreeNode applyTo = constructRecursive(matches);
if (applyTo == null) return null;
else return new UnaryPrefixNode(operator, applyTo);
else return new UnaryNode(operator, applyTo);
}
} else if (matchType == TokenType.NUM) {
return new NumberNode(abacus.numberFromString(match.getContent()));