diff options
Diffstat (limited to 'src/ast/nodes/IfNode.java')
-rw-r--r-- | src/ast/nodes/IfNode.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ast/nodes/IfNode.java b/src/ast/nodes/IfNode.java index 50dde4a..f51d486 100644 --- a/src/ast/nodes/IfNode.java +++ b/src/ast/nodes/IfNode.java @@ -1,10 +1,9 @@ package ast.nodes; +import ast.types.*; import java.util.ArrayList; - import semanticanalysis.SemanticError; import semanticanalysis.SymbolTable; -import ast.types.*; /** * Node for the `if` statement of the grammar. @@ -42,11 +41,11 @@ public class IfNode implements Node { if (thenexp.getClass().equals(elseexp.getClass())) return thenexp; else { - System.out.println("Type Error: incompatible types in then and else branches"); + System.out.println("Type Error: incompatible types in then and else branches."); return new ErrorType(); } } else { - System.out.println("Type Error: non boolean condition in if"); + System.out.println("Type Error: non boolean condition in if."); return new ErrorType(); } } |