package xhl.core;

import java.util.HashMap;
import java.util.Map;

public class SymbolTable {
    private final Map<String, Object> table = new HashMap<String, Object>();

    public boolean containsKey(Symbol sym) {
        return table.containsKey(sym.getName());
    }

    public Object get(Symbol sym) {
        return table.get(sym.getName());
    }

    public Object put(Symbol sym, Object value) {
        return table.put(sym.getName(), value);
    }

    public void putAll(SymbolTable t) {
        for (String key : t.table.keySet()) {
            table.put(key, t.table.get(key));
        }
    }

}

@@ -107,29 +107,29 @@
  final Map%3CS
-tring
+ymbol
 , Object%3E ta
@@ -147,21 +147,21 @@
 ashMap%3CS
-tring
+ymbol
 , Object
@@ -243,34 +243,24 @@
 tainsKey(sym
-.getName()
 );%0A    %7D%0A%0A  
@@ -321,26 +321,16 @@
 .get(sym
-.getName()
 );%0A    %7D
@@ -413,18 +413,8 @@
 (sym
-.getName()
 , va
@@ -484,13 +484,13 @@
 r (S
-tring
+ymbol
  key
@@ -524,22 +524,16 @@
         
-table.
 put(key,
@@ -535,22 +535,16 @@
 (key, t.
-table.
 get(key)

use symbols as keys, not symbol names.