Parse decimal values
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
f3f74b9ff5
commit
3dc55c452c
3 changed files with 17 additions and 1 deletions
|
@ -884,10 +884,14 @@ class parser::imp {
|
|||
}
|
||||
|
||||
expr parse_decimal() {
|
||||
not_implemented_yet();
|
||||
auto p = pos();
|
||||
expr r = save(mk_real_value(m_scanner.get_num_val()), p);
|
||||
next();
|
||||
return r;
|
||||
}
|
||||
|
||||
expr parse_string() {
|
||||
// TODO
|
||||
not_implemented_yet();
|
||||
}
|
||||
|
||||
|
|
5
tests/lean/arith8.lean
Normal file
5
tests/lean/arith8.lean
Normal file
|
@ -0,0 +1,5 @@
|
|||
Eval 10.3
|
||||
Eval 0.3
|
||||
Eval 0.3 + 0.1
|
||||
Eval 0.2 + 0.7
|
||||
Eval 1/3 + 0.1
|
7
tests/lean/arith8.lean.expected.out
Normal file
7
tests/lean/arith8.lean.expected.out
Normal file
|
@ -0,0 +1,7 @@
|
|||
Set: pp::colors
|
||||
Set: pp::unicode
|
||||
103/10
|
||||
3/10
|
||||
2/5
|
||||
9/10
|
||||
13/30
|
Loading…
Reference in a new issue