diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/extension.lux | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/extension.lux b/new-luxc/source/luxc/lang/extension.lux index c5e6a8e25..e8121b9b6 100644 --- a/new-luxc/source/luxc/lang/extension.lux +++ b/new-luxc/source/luxc/lang/extension.lux @@ -10,15 +10,20 @@ (// ["la" analysis] ["ls" synthesis])) -(exception: #export Unknown-Analysis) -(exception: #export Unknown-Synthesis) -(exception: #export Unknown-Translation) -(exception: #export Unknown-Statement) - -(exception: #export Cannot-Define-Analysis-More-Than-Once) -(exception: #export Cannot-Define-Synthesis-More-Than-Once) -(exception: #export Cannot-Define-Translation-More-Than-Once) -(exception: #export Cannot-Define-Statement-More-Than-Once) +(do-template [<name>] + [(exception: #export (<name> {message Text}) + message)] + + [Unknown-Analysis] + [Unknown-Synthesis] + [Unknown-Translation] + [Unknown-Statement] + + [Cannot-Define-Analysis-More-Than-Once] + [Cannot-Define-Synthesis-More-Than-Once] + [Cannot-Define-Translation-More-Than-Once] + [Cannot-Define-Statement-More-Than-Once] + ) (type: #export Analysis (-> (-> Code (Meta Code)) @@ -51,13 +56,13 @@ (def: get (Meta Extensions) - (function [compiler] + (function (_ compiler) (#e.Success [compiler (|> compiler (get@ #.extensions) (:! Extensions))]))) (def: (set extensions) (-> Extensions (Meta Unit)) - (function [compiler] + (function (_ compiler) (#e.Success [(set@ #.extensions (:! Void extensions) compiler) []]))) |