From c677e9d5c15bfe56ba1f30e5d6305612fc76cab4 Mon Sep 17 00:00:00 2001 From: Yin Wang Date: Mon, 3 Feb 2014 19:18:57 -0800 Subject: [PATCH] string type --- src/main/java/org/yinwang/yin/Scope.java | 6 ++---- src/main/java/org/yinwang/yin/value/StringType.java | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 src/main/java/org/yinwang/yin/value/StringType.java diff --git a/src/main/java/org/yinwang/yin/Scope.java b/src/main/java/org/yinwang/yin/Scope.java index b771c31..48d2910 100644 --- a/src/main/java/org/yinwang/yin/Scope.java +++ b/src/main/java/org/yinwang/yin/Scope.java @@ -1,10 +1,7 @@ package org.yinwang.yin; -import org.yinwang.yin.value.BoolType; -import org.yinwang.yin.value.BoolValue; -import org.yinwang.yin.value.IntType; -import org.yinwang.yin.value.Value; +import org.yinwang.yin.value.*; import org.yinwang.yin.value.primitives.*; import java.util.LinkedHashMap; @@ -134,6 +131,7 @@ public static Scope buildInitScope() { init.putValue("Int", new IntType()); init.putValue("Bool", new BoolType()); + init.putValue("String", new StringType()); return init; } diff --git a/src/main/java/org/yinwang/yin/value/StringType.java b/src/main/java/org/yinwang/yin/value/StringType.java new file mode 100644 index 0000000..5653e4e --- /dev/null +++ b/src/main/java/org/yinwang/yin/value/StringType.java @@ -0,0 +1,8 @@ +package org.yinwang.yin.value; + + +public class StringType extends Value { + public String toString() { + return "String"; + } +}