aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/macro/syntax/type/variable.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/macro/syntax/type/variable.lux')
-rw-r--r--stdlib/source/library/lux/macro/syntax/type/variable.lux28
1 files changed, 28 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/macro/syntax/type/variable.lux b/stdlib/source/library/lux/macro/syntax/type/variable.lux
new file mode 100644
index 000000000..e73020c42
--- /dev/null
+++ b/stdlib/source/library/lux/macro/syntax/type/variable.lux
@@ -0,0 +1,28 @@
+(.module:
+ [library
+ [lux #*
+ [abstract
+ [equivalence (#+ Equivalence)]]
+ [control
+ [parser
+ ["<.>" code (#+ Parser)]]]
+ [data
+ ["." text]]
+ [macro
+ ["." code]]]])
+
+(type: #export Variable
+ Text)
+
+(def: #export equivalence
+ (Equivalence Variable)
+ text.equivalence)
+
+(def: #export format
+ (-> Variable Code)
+ code.local_identifier)
+
+(def: #export parser
+ {#.doc "Parser for the common type variable/parameter used by many macros."}
+ (Parser Variable)
+ <code>.local_identifier)