Earmuff stuff.

This commit is contained in:
Thomas Mashek 2013-03-12 12:46:20 -07:00
parent d251e177d8
commit b6eca8dfc0
2 changed files with 10 additions and 0 deletions

View File

@ -61,6 +61,9 @@ def _resolve_atom(obj):
if obj in table: if obj in table:
return HySymbol(table[obj]) return HySymbol(table[obj])
if obj.startswith("*") and obj.endswith("*") and obj != "*":
obj = obj[1:-1].upper()
if "-" in obj and obj != "-": if "-" in obj and obj != "-":
obj = obj.replace("-", "_") obj = obj.replace("-", "_")

View File

@ -124,3 +124,10 @@
(catch KeyError (do (catch KeyError (do
(+ 1 1) (+ 1 1)
(assert (= 1 1)))))) (assert (= 1 1))))))
(defn test-earmuffs []
"NATIVE: Test earmuffs"
(def *foo* "2")
(def foo "3")
(assert (= *foo* FOO))
(assert (!= *foo* foo)))