aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/macro/syntax/common/reader.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/macro/syntax/common/reader.lux')
-rw-r--r--stdlib/source/lux/macro/syntax/common/reader.lux16
1 files changed, 6 insertions, 10 deletions
diff --git a/stdlib/source/lux/macro/syntax/common/reader.lux b/stdlib/source/lux/macro/syntax/common/reader.lux
index ac6d876c3..0e8b5df9a 100644
--- a/stdlib/source/lux/macro/syntax/common/reader.lux
+++ b/stdlib/source/lux/macro/syntax/common/reader.lux
@@ -1,7 +1,7 @@
(.module: {#.doc "Commons syntax readers."}
lux
(lux (control monad
- ["p" parser])
+ ["p" parser "p/" Monad<Parser>])
(data (coll [list])
[ident "ident/" Eq<Ident>]
[product]
@@ -12,13 +12,9 @@
## Exports
(def: #export export
- {#.doc (doc "A reader for export levels."
- "Such as:"
- #export
- #hidden)}
- (Syntax (Maybe Export))
- (p.maybe (p.alt (s.this (' #export))
- (s.this (' #hidden)))))
+ (Syntax Bool)
+ (p.either (p.after (s.this (' #export)) (p/wrap true))
+ (p/wrap false)))
## Declarations
(def: #export declaration
@@ -28,7 +24,7 @@
(foo bar baz))}
(Syntax Declaration)
(p.either (p.seq s.local-symbol
- (:: p.Monad<Parser> wrap (list)))
+ (p/wrap (list)))
(s.form (p.seq s.local-symbol
(p.many s.local-symbol)))))
@@ -46,7 +42,7 @@
type s.any
value s.any]
(wrap [(#.Some type) value])))
- (p.seq (:: p.Monad<Parser> wrap #.None)
+ (p.seq (p/wrap #.None)
s.any)))
(def: _definition-anns-tag^