diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/compiler/default/syntax.lux | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux/compiler/default/syntax.lux b/stdlib/source/lux/compiler/default/syntax.lux index 20057bf28..e06590f2e 100644 --- a/stdlib/source/lux/compiler/default/syntax.lux +++ b/stdlib/source/lux/compiler/default/syntax.lux @@ -204,7 +204,7 @@ (def: rich-digits^ (l.Lexer Text) - (l.seq l.decimal + (l.and l.decimal (l.some rich-digit))) (do-template [<name> <tag> <lexer> <codec>] @@ -221,12 +221,12 @@ [where (<tag> value)]]))))] [int #.Int - (l.seq (p.default "" (l.one-of "-")) + (l.and (p.default "" (l.one-of "-")) rich-digits^) number.Codec<Text,Int>] [rev #.Rev - (l.seq (l.one-of ".") + (l.and (l.one-of ".") rich-digits^) number.Codec<Text,Rev>] ) @@ -259,7 +259,7 @@ (def: (normal-nat where) (-> Cursor (l.Lexer [Cursor Code])) (do p.Monad<Parser> - [chunk (l.seq (l.one-of "+") + [chunk (l.and (l.one-of "+") rich-digits^)] (case (:: number.Codec<Text,Nat> decode chunk) (#.Left error) @@ -277,13 +277,13 @@ (def: (normal-frac where) (-> Cursor (l.Lexer [Cursor Code])) (do p.Monad<Parser> - [chunk ($_ l.seq + [chunk ($_ l.and (p.default "" (l.one-of "-")) rich-digits^ (l.one-of ".") rich-digits^ (p.default "" - ($_ l.seq + ($_ l.and (l.one-of "eE") (p.default "" (l.one-of "+-")) rich-digits^)))] @@ -305,7 +305,7 @@ (def: (ratio-frac where) (-> Cursor (l.Lexer [Cursor Code])) (do p.Monad<Parser> - [chunk ($_ l.seq + [chunk ($_ l.and (p.default "" (l.one-of "-")) rich-digits^ (l.one-of "/") |