diff options
author | Eduardo Julian | 2018-04-06 08:32:41 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-04-06 08:32:41 -0400 |
commit | ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 (patch) | |
tree | 50ba106541f2357daf27393df28e8b263f7311e1 /new-luxc/source/luxc/lang/analysis/expression.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
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) |