add method to get the value as a struct
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package de.hsrm.compiler.Klang;
|
||||
|
||||
import de.hsrm.compiler.Klang.types.Type;
|
||||
import java.util.Map;
|
||||
|
||||
public class Value {
|
||||
public Type type;
|
||||
@@ -30,4 +31,9 @@ public class Value {
|
||||
public boolean asBoolean() {
|
||||
return (boolean) this.value;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, Value> asStruct() {
|
||||
return (Map<String, Value>) this.value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user