diff options
author | Eduardo Julian | 2017-07-02 15:57:18 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-07-02 15:57:18 -0400 |
commit | d28c16939e02dbd7e3a2d987bc88135285938f2f (patch) | |
tree | 7cbcc0827101f468ed2c905410d8bde02a0dc8dd /new-luxc | |
parent | c0acd75d41ed0e927ec318d4b12c0ec4f5f2e1d3 (diff) |
- Real syntax now supports exponential.
Diffstat (limited to 'new-luxc')
-rw-r--r-- | new-luxc/source/luxc/parser.lux | 7 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/parser.lux | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/new-luxc/source/luxc/parser.lux b/new-luxc/source/luxc/parser.lux index 7d9c77f2b..9778eb465 100644 --- a/new-luxc/source/luxc/parser.lux +++ b/new-luxc/source/luxc/parser.lux @@ -237,7 +237,12 @@ (p;default "" (l;one-of "-")) rich-digits^ (l;one-of ".") - rich-digits^) + rich-digits^ + (p;default "" + ($_ l;seq + (l;one-of "eE") + (p;default "" (l;one-of "+-")) + (l;many l;decimal)))) number;Codec<Text,Real>] [parse-deg #;Deg diff --git a/new-luxc/test/test/luxc/parser.lux b/new-luxc/test/test/luxc/parser.lux index b7eaa0ea5..c90812cc8 100644 --- a/new-luxc/test/test/luxc/parser.lux +++ b/new-luxc/test/test/luxc/parser.lux @@ -74,7 +74,6 @@ composite^)))))) (context: "Lux code parser." - #seed +15765541630132670628 [sample code^] (test "Can parse Lux code." (case (&;parse [default-cursor (code;to-text sample)]) @@ -108,7 +107,6 @@ (wrap (format "#( " comment " )#"))))))) (context: "Multi-line text & comments." - #seed +13835085537605735783 [#let [char-gen (|> r;nat (r;filter (function [value] (not (or (text;space? value) (n.= (char "\"") value))))))] |