summaryrefslogtreecommitdiffstats
path: root/src/Compiler/Statement.java
diff options
context:
space:
mode:
authorAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-11-20 02:24:52 +0000
committerAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-11-20 02:24:52 +0000
commit68f651f90ac9bb42e6fcb461f72f82ee74df1fdd (patch)
treea94d69ae43cdc92395f1dbac3160bb4d45baa570 /src/Compiler/Statement.java
parent286e177e603d57d445393a0f4899bf7a17a4c31d (diff)
downloadesotericFORTRAN-68f651f90ac9bb42e6fcb461f72f82ee74df1fdd.tar.gz
esotericFORTRAN-68f651f90ac9bb42e6fcb461f72f82ee74df1fdd.zip
Added initial support for do while loops
Diffstat (limited to 'src/Compiler/Statement.java')
-rw-r--r--src/Compiler/Statement.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Compiler/Statement.java b/src/Compiler/Statement.java
index 10ed878..a3c0960 100644
--- a/src/Compiler/Statement.java
+++ b/src/Compiler/Statement.java
@@ -71,6 +71,22 @@ abstract class Statement {
}
}
+ static class DoWhileStatement extends Statement{
+ DoWhileStatement(Expression condition,BlockStatement codeBlock){
+ this.condition=condition;
+ this.codeBlock=codeBlock;
+
+ }
+
+ final Expression condition;
+ final BlockStatement codeBlock;
+
+ @Override
+ public String getStatmentType() {
+ return "dowhileStmt";
+ }
+ }
+
static class VariableDeclaration extends Statement{
VariableDeclaration(Token name,String type){