aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/couscous/ast/LiteralNode.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-03-09 18:11:17 +0000
committerMichael Williamson <mike@zwobble.org>2016-03-09 18:11:17 +0000
commit20dc1e124d606cf4298d5112b6d3c4f6c74e9b68 (patch)
tree47914e8b0356b2f40e3723eae650d3bb6f100dd4 /src/main/java/org/zwobble/couscous/ast/LiteralNode.java
parent8ac6cb16b727b5e3d28ab89fee1d169a4f74d9a1 (diff)
Introduce Type interface
Diffstat (limited to 'src/main/java/org/zwobble/couscous/ast/LiteralNode.java')
-rw-r--r--src/main/java/org/zwobble/couscous/ast/LiteralNode.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/zwobble/couscous/ast/LiteralNode.java b/src/main/java/org/zwobble/couscous/ast/LiteralNode.java
index a76ca80..bb38562 100644
--- a/src/main/java/org/zwobble/couscous/ast/LiteralNode.java
+++ b/src/main/java/org/zwobble/couscous/ast/LiteralNode.java
@@ -1,5 +1,6 @@
package org.zwobble.couscous.ast;
+import org.zwobble.couscous.ast.types.ScalarType;
import org.zwobble.couscous.ast.visitors.ExpressionNodeMapper;
import org.zwobble.couscous.ast.visitors.NodeTransformer;
import org.zwobble.couscous.values.*;
@@ -25,23 +26,23 @@ public class LiteralNode implements ExpressionNode {
return new LiteralNode(value(value), BooleanValue.REF);
}
- public static LiteralNode literal(TypeName type) {
+ public static LiteralNode literal(ScalarType type) {
return new LiteralNode(value(type), ObjectValues.CLASS);
}
- public static LiteralNode of(PrimitiveValue value, TypeName type) {
+ public static LiteralNode of(PrimitiveValue value, ScalarType type) {
return new LiteralNode(value, type);
}
private final PrimitiveValue value;
- private final TypeName type;
+ private final ScalarType type;
- private LiteralNode(PrimitiveValue value, TypeName type) {
+ private LiteralNode(PrimitiveValue value, ScalarType type) {
this.value = value;
this.type = type;
}
- public TypeName getType() {
+ public ScalarType getType() {
return type;
}