add method to get the raw value representation
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package de.hsrm.compiler.Klang;
|
package de.hsrm.compiler.Klang;
|
||||||
|
|
||||||
|
import de.hsrm.compiler.Klang.types.Type;
|
||||||
|
|
||||||
public class Value {
|
public class Value {
|
||||||
private Object value;
|
private Object value;
|
||||||
|
|
||||||
@@ -7,6 +9,10 @@ public class Value {
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object asObject() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
public int asInteger() {
|
public int asInteger() {
|
||||||
return (int) this.value;
|
return (int) this.value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user