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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user