1
0
mirror of https://github.com/DanilaFe/abacus synced 2025-12-28 03:31:08 +00:00

Switch the Lexer and TreeBuilder to using exceptions.

This commit is contained in:
2017-09-23 15:31:35 -07:00
parent a3bfc34c1c
commit 31996219ad
6 changed files with 29 additions and 10 deletions

View File

@@ -142,9 +142,6 @@ public class AbacusController implements PluginListener {
private String attemptCalculation() {
try {
TreeNode constructedTree = abacus.parseString(inputField.getText());
if (constructedTree == null) {
return ERR_SYNTAX;
}
EvaluationResult result = abacus.evaluateTree(constructedTree);
NumberInterface evaluatedNumber = result.getValue();
String resultingString = evaluatedNumber.toString();