aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/extension/statement.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/extension/statement.lux')
-rw-r--r--new-luxc/source/luxc/lang/extension/statement.lux17
1 files changed, 11 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/extension/statement.lux b/new-luxc/source/luxc/lang/extension/statement.lux
index c084055b7..81b43f205 100644
--- a/new-luxc/source/luxc/lang/extension/statement.lux
+++ b/new-luxc/source/luxc/lang/extension/statement.lux
@@ -22,8 +22,13 @@
[".T" eval]))
[".L" eval])))
-(exception: #export Invalid-Statement)
-(exception: #export Invalid-Alias)
+(do-template [<name>]
+ [(exception: #export (<name> {message Text})
+ message)]
+
+ [Invalid-Statement]
+ [Invalid-Alias]
+ )
(def: (throw-invalid-statement procedure inputsC+)
(All [a] (-> Text (List Code) (Meta a)))
@@ -32,7 +37,7 @@
" Inputs:"
(|> inputsC+
list.enumerate
- (list/map (function [[idx inputC]]
+ (list/map (function (_ [idx inputC])
(format "\n " (%n idx) " " (%code inputC))))
(text.join-with "")) "\n")))
@@ -58,7 +63,7 @@
(def: (lux//def procedure)
(-> Text //.Statement)
- (function [inputsC+]
+ (function (_ inputsC+)
(case inputsC+
(^ (list [_ (#.Symbol ["" def-name])] valueC annotationsC))
(hostL.with-context def-name
@@ -96,7 +101,7 @@
(def: (lux//program procedure)
(-> Text //.Statement)
- (function [inputsC+]
+ (function (_ inputsC+)
(case inputsC+
(^ (list [_ (#.Symbol ["" args])] programC))
(do macro.Monad<Meta>
@@ -115,7 +120,7 @@
(do-template [<mame> <type> <installer>]
[(def: (<mame> procedure)
(-> Text //.Statement)
- (function [inputsC+]
+ (function (_ inputsC+)
(case inputsC+
(^ (list [_ (#.Text name)] valueC))
(do macro.Monad<Meta>