diff options
author | Eduardo Julian | 2016-05-03 19:34:49 -0400 |
---|---|---|
committer | Eduardo Julian | 2016-05-03 19:34:49 -0400 |
commit | 28ea867861a504c39b904a6dbf62a327b052f02f (patch) | |
tree | 5d08155e722b170abd3f259d7a402feb7119fb5c /src/lux/analyser/module.clj | |
parent | 3263d2b4cb55d142f32bc4e1c140cbd58d1dc4b9 (diff) |
- Now, showing the right error when trying to lex an ident with an invalid/unknown prefix.
Diffstat (limited to '')
-rw-r--r-- | src/lux/analyser/module.clj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lux/analyser/module.clj b/src/lux/analyser/module.clj index ddec601b1..c15062783 100644 --- a/src/lux/analyser/module.clj +++ b/src/lux/analyser/module.clj @@ -42,7 +42,7 @@ (|do [current-module &/get-module-name] (fn [state] (if (&/|member? module (->> state (&/get$ &/$modules) (&/|get current-module) (&/get$ $imports))) - (fail* (str "Can't import module " (pr-str module) " twice @ " current-module)) + (fail* (str "[Analyser Error] Can't import module " (pr-str module) " twice @ " current-module)) (return* (&/update$ &/$modules (fn [ms] (&/|update current-module @@ -125,12 +125,12 @@ (fn [state] (if-let [real-name (->> state (&/get$ &/$modules) (&/|get current-module) (&/get$ $module-aliases) (&/|get name))] (return* state real-name) - (fail* (str "Unknown alias: " name)))))) + (fail* (str "[Analyser Error] Unknown alias: " name)))))) (defn alias [module alias reference] (fn [state] (if-let [real-name (->> state (&/get$ &/$modules) (&/|get module) (&/get$ $module-aliases) (&/|get alias))] - (fail* (str "Can't re-use alias \"" alias "\" @ " module)) + (fail* (str "[Analyser Error] Can't re-use alias \"" alias "\" @ " module)) (return* (->> state (&/update$ &/$modules (fn [ms] @@ -262,7 +262,7 @@ (if (or ?exported (= module current-module)) (return* state &/unit-tag) - (fail* (str "Can't access tag #" (&/ident->text (&/T [module tag-name])) " from module " current-module)))) + (fail* (str "[Analyser Error] Can't access tag #" (&/ident->text (&/T [module tag-name])) " from module " current-module)))) (fail* (str "[Module Error] Unknown tag: " (&/ident->text (&/T [module tag-name]))))) (fail* (str "[Module Error] Unknown module: " module)))))) |