From a014f22d8c8c5c15aa08500a02da0d0717d62b64 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Wed, 13 Nov 2019 21:06:46 +0100 Subject: Pass interpreter tests --- .../cloudatlas/interpreter/EnvironmentTable.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/interpreter/EnvironmentTable.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/interpreter/EnvironmentTable.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/EnvironmentTable.java b/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/EnvironmentTable.java new file mode 100644 index 0000000..bfaeb79 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/EnvironmentTable.java @@ -0,0 +1,19 @@ +package pl.edu.mimuw.cloudatlas.interpreter; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import pl.edu.mimuw.cloudatlas.model.ValueNull; + +class EnvironmentTable extends Environment { + private final Table table; + + public EnvironmentTable(Table table) { + this.table = table; + } + + public Result getIdent(String ident) { + return new ResultColumn(table.getColumn(ident).getValue()); + } +} -- cgit v1.2.3