|
From: <caw...@us...> - 2007-02-23 19:38:56
|
Revision: 2021
http://svn.sourceforge.net/rubyeclipse/?rev=2021&view=rev
Author: cawilliams
Date: 2007-02-23 11:38:55 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
rename the class to better representw hat it does (and avoid confusion with actual ConstNodes)
Added Paths:
-----------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/data/LiteralNodeTypeNames.java
Added: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/data/LiteralNodeTypeNames.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/data/LiteralNodeTypeNames.java (rev 0)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/data/LiteralNodeTypeNames.java 2007-02-23 19:38:55 UTC (rev 2021)
@@ -0,0 +1,34 @@
+package org.rubypeople.rdt.internal.ti.data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Maps from JRuby AST Literal Node classnames to the Ruby type they represent.
+ * @author Jason
+ *
+ */
+public class LiteralNodeTypeNames {
+ public static String get(String nodeType)
+ {
+ return CONST_NODE_TYPE_NAMES.get(nodeType);
+ }
+
+ private static final Map<String,String> CONST_NODE_TYPE_NAMES = new HashMap<String,String>();
+ static {
+ CONST_NODE_TYPE_NAMES.put("FixnumNode", "Fixnum");
+ CONST_NODE_TYPE_NAMES.put("DStrNode", "String");
+ CONST_NODE_TYPE_NAMES.put("StrNode", "String");
+ CONST_NODE_TYPE_NAMES.put("ZArrayNode", "Array");
+ CONST_NODE_TYPE_NAMES.put("ArrayNode", "Array");
+ CONST_NODE_TYPE_NAMES.put("TrueNode", "TrueClass");
+ CONST_NODE_TYPE_NAMES.put("FalseNode", "FalseClass");
+ CONST_NODE_TYPE_NAMES.put("NilNode", "NilClass");
+ CONST_NODE_TYPE_NAMES.put("FloatNode", "Float");
+ CONST_NODE_TYPE_NAMES.put("BignumNode", "Bignum");
+ CONST_NODE_TYPE_NAMES.put("SymbolNode", "Symbol");
+ CONST_NODE_TYPE_NAMES.put("DSymbolNode","Symbol");
+ CONST_NODE_TYPE_NAMES.put("HashNode", "Hash");
+ CONST_NODE_TYPE_NAMES.put("RegexpNode", "Regexp");
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|