aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2016-10-02 02:00:29 -0400
committerEduardo Julian2016-10-02 02:00:29 -0400
commit8b39c3d8f9b9817c5455f8fe76ce5e9ef568c885 (patch)
tree2b123888da9ef944ad24235b0ffd07263b98fc17
parent669e7c950f07d9109a3ed9475d0c75f0a2417996 (diff)
- Now adding cursor information when analysing function/macro calls, to avoid missing cursors during macro-expansions and some function calls.
Diffstat (limited to '')
-rw-r--r--src/lux/analyser.clj10
-rw-r--r--src/lux/analyser/lux.clj6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lux/analyser.clj b/src/lux/analyser.clj
index 2ad3745d8..f97a0ea08 100644
--- a/src/lux/analyser.clj
+++ b/src/lux/analyser.clj
@@ -171,8 +171,9 @@
(&&lux/analyse-program analyse optimize compile-program ?args ?body)))
;; else
- (|do [=fn (just-analyse analyse (&/T [command-meta command]))]
- (&&lux/analyse-apply analyse cursor exo-type =fn parameters)))
+ (&/with-cursor cursor
+ (|do [=fn (just-analyse analyse (&/T [command-meta command]))]
+ (&&lux/analyse-apply analyse cursor exo-type =fn parameters))))
(&/$IntS idx)
(&/with-analysis-meta cursor exo-type
@@ -183,8 +184,9 @@
(analyse-variant+ analyse exo-type ?ident parameters))
_
- (|do [=fn (just-analyse analyse (&/T [command-meta command]))]
- (&&lux/analyse-apply analyse cursor exo-type =fn parameters)))
+ (&/with-cursor cursor
+ (|do [=fn (just-analyse analyse (&/T [command-meta command]))]
+ (&&lux/analyse-apply analyse cursor exo-type =fn parameters))))
_
(&/fail-with-loc (str "[Analyser Error] Unknown syntax: " (prn-str (&/show-ast (&/T [(&/T ["" -1 -1]) token])))))
diff --git a/src/lux/analyser/lux.clj b/src/lux/analyser/lux.clj
index b4f87f140..8ecb2c247 100644
--- a/src/lux/analyser/lux.clj
+++ b/src/lux/analyser/lux.clj
@@ -409,12 +409,10 @@
(&/flat-map% (partial analyse exo-type) macro-expansion))
_
- (&/with-analysis-meta cursor exo-type
- (do-analyse-apply analyse exo-type =fn ?args))))
+ (do-analyse-apply analyse exo-type =fn ?args)))
_
- (&/with-analysis-meta cursor exo-type
- (do-analyse-apply analyse exo-type =fn ?args)))
+ (do-analyse-apply analyse exo-type =fn ?args))
))
(defn analyse-case [analyse exo-type ?value ?branches]