aboutsummaryrefslogtreecommitdiff
path: root/src/lang/analyser.clj
diff options
context:
space:
mode:
authorEduardo Julian2015-01-03 11:24:14 -0400
committerEduardo Julian2015-01-03 11:24:14 -0400
commit661c70e4d786e7b2188564beddc586f1a50e4656 (patch)
treefe3aff74ffa526d455b7e22d7015573dc926f5f1 /src/lang/analyser.clj
parent212dd66966a873e3d7183b071f719ef58e4d88fe (diff)
The language officially has a name: Lux (stylized as "lux").
Diffstat (limited to '')
-rw-r--r--src/lux/analyser.clj (renamed from src/lang/analyser.clj)28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lang/analyser.clj b/src/lux/analyser.clj
index 30592c817..115a943c9 100644
--- a/src/lang/analyser.clj
+++ b/src/lux/analyser.clj
@@ -1,15 +1,15 @@
-(ns lang.analyser
+(ns lux.analyser
(:refer-clojure :exclude [resolve])
(:require (clojure [string :as string]
[template :refer [do-template]])
[clojure.core.match :refer [match]]
- (lang [util :as &util :refer [exec return* return fail fail*
- repeat-m try-m try-all-m map-m reduce-m
- apply-m within
- normalize-ident
- loader]]
- [parser :as &parser]
- [type :as &type])))
+ (lux [util :as &util :refer [exec return* return fail fail*
+ repeat-m try-m try-all-m map-m reduce-m
+ apply-m within
+ normalize-ident
+ loader]]
+ [parser :as &parser]
+ [type :as &type])))
(declare analyse-form
->tokens
@@ -64,7 +64,7 @@
;; ?macro-name
;; (get-in state [:lambda-scope 0])
;; (some (partial = ?macro-name) (get-in state [:lambda-scope 0])))
- [::&util/ok [state (some (partial = ?macro-name) (get-in state [:lambda-scope 0]))]])
+ [::&util/ok [state (some (partial = ?macro-name) (get-in state [:lambda-scope 0]))]])
_
[::&util/ok [state false]])
@@ -105,10 +105,10 @@
(match =return
[::&util/ok [?state ?value]]
[::&util/ok [(do ;; (prn [:lambda-scope 0] (get-in ?state [:lambda-scope 0]))
- ;; (prn [:lambda-scope 1] (get-in ?state [:lambda-scope 1]))
- (-> ?state
- (update-in [:lambda-scope 0] pop)
- (assoc-in [:lambda-scope 1] (inc (get-in state [:lambda-scope 1])))))
+ ;; (prn [:lambda-scope 1] (get-in ?state [:lambda-scope 1]))
+ (-> ?state
+ (update-in [:lambda-scope 0] pop)
+ (assoc-in [:lambda-scope 1] (inc (get-in state [:lambda-scope 1])))))
?value]]
_
@@ -223,7 +223,7 @@
(if-let [global|import (or (get-in state [:defs-env ident])
(get-in state [:imports ident]))]
(do ;; (prn 'resolve/_3 'global|import global|import)
- [::&util/ok [state global|import]])
+ [::&util/ok [state global|import]])
[::&util/failure (str "Unresolved identifier: " ident)])
:else