diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/expression.lux | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/expression.lux b/new-luxc/source/luxc/lang/analysis/expression.lux index 8907ba665..aaa64940b 100644 --- a/new-luxc/source/luxc/lang/analysis/expression.lux +++ b/new-luxc/source/luxc/lang/analysis/expression.lux @@ -22,14 +22,19 @@ [".A" reference] [".A" structure])) -(exception: #export Macro-Expression-Must-Have-Single-Expansion) -(exception: #export Unrecognized-Syntax) -(exception: #export Macro-Expansion-Failed) +(do-template [<name>] + [(exception: #export (<name> {message Text}) + message)] + + [Macro-Expression-Must-Have-Single-Expansion] + [Unrecognized-Syntax] + [Macro-Expansion-Failed] + ) (def: #export (analyser eval) (-> &.Eval &.Analyser) (: (-> Code (Meta la.Analysis)) - (function analyse [code] + (function (analyse code) (do macro.Monad<Meta> [expectedT macro.expected-type] (let [[cursor code'] code] @@ -96,7 +101,7 @@ (#.Some macro) (do @ [expansion (: (Meta (List Code)) - (function [compiler] + (function (_ compiler) (case (macroL.expand macro args compiler) (#e.Error error) ((&.throw Macro-Expansion-Failed error) compiler) |