fix(frontends/lean/parser): decimals
This commit is contained in:
parent
81618e30f3
commit
b777375469
4 changed files with 7 additions and 1 deletions
|
@ -1574,7 +1574,7 @@ expr parser::parse_decimal_expr() {
|
||||||
return num;
|
return num;
|
||||||
} else {
|
} else {
|
||||||
expr den = save_pos(mk_prenum(val.get_denominator()), p);
|
expr den = save_pos(mk_prenum(val.get_denominator()), p);
|
||||||
expr div = save_pos(mk_constant(get_div_name()), p);
|
expr div = save_pos(mk_constant(get_division_name()), p);
|
||||||
return save_pos(lean::mk_app(div, num, den), p);
|
return save_pos(lean::mk_app(div, num, den), p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ name const * g_char_mk = nullptr;
|
||||||
name const * g_congr = nullptr;
|
name const * g_congr = nullptr;
|
||||||
name const * g_dite = nullptr;
|
name const * g_dite = nullptr;
|
||||||
name const * g_div = nullptr;
|
name const * g_div = nullptr;
|
||||||
|
name const * g_division = nullptr;
|
||||||
name const * g_empty = nullptr;
|
name const * g_empty = nullptr;
|
||||||
name const * g_empty_rec = nullptr;
|
name const * g_empty_rec = nullptr;
|
||||||
name const * g_eq = nullptr;
|
name const * g_eq = nullptr;
|
||||||
|
@ -172,6 +173,7 @@ void initialize_constants() {
|
||||||
g_congr = new name{"congr"};
|
g_congr = new name{"congr"};
|
||||||
g_dite = new name{"dite"};
|
g_dite = new name{"dite"};
|
||||||
g_div = new name{"div"};
|
g_div = new name{"div"};
|
||||||
|
g_division = new name{"division"};
|
||||||
g_empty = new name{"empty"};
|
g_empty = new name{"empty"};
|
||||||
g_empty_rec = new name{"empty", "rec"};
|
g_empty_rec = new name{"empty", "rec"};
|
||||||
g_eq = new name{"eq"};
|
g_eq = new name{"eq"};
|
||||||
|
@ -327,6 +329,7 @@ void finalize_constants() {
|
||||||
delete g_congr;
|
delete g_congr;
|
||||||
delete g_dite;
|
delete g_dite;
|
||||||
delete g_div;
|
delete g_div;
|
||||||
|
delete g_division;
|
||||||
delete g_empty;
|
delete g_empty;
|
||||||
delete g_empty_rec;
|
delete g_empty_rec;
|
||||||
delete g_eq;
|
delete g_eq;
|
||||||
|
@ -481,6 +484,7 @@ name const & get_char_mk_name() { return *g_char_mk; }
|
||||||
name const & get_congr_name() { return *g_congr; }
|
name const & get_congr_name() { return *g_congr; }
|
||||||
name const & get_dite_name() { return *g_dite; }
|
name const & get_dite_name() { return *g_dite; }
|
||||||
name const & get_div_name() { return *g_div; }
|
name const & get_div_name() { return *g_div; }
|
||||||
|
name const & get_division_name() { return *g_division; }
|
||||||
name const & get_empty_name() { return *g_empty; }
|
name const & get_empty_name() { return *g_empty; }
|
||||||
name const & get_empty_rec_name() { return *g_empty_rec; }
|
name const & get_empty_rec_name() { return *g_empty_rec; }
|
||||||
name const & get_eq_name() { return *g_eq; }
|
name const & get_eq_name() { return *g_eq; }
|
||||||
|
|
|
@ -20,6 +20,7 @@ name const & get_char_mk_name();
|
||||||
name const & get_congr_name();
|
name const & get_congr_name();
|
||||||
name const & get_dite_name();
|
name const & get_dite_name();
|
||||||
name const & get_div_name();
|
name const & get_div_name();
|
||||||
|
name const & get_division_name();
|
||||||
name const & get_empty_name();
|
name const & get_empty_name();
|
||||||
name const & get_empty_rec_name();
|
name const & get_empty_rec_name();
|
||||||
name const & get_eq_name();
|
name const & get_eq_name();
|
||||||
|
|
|
@ -13,6 +13,7 @@ char.mk
|
||||||
congr
|
congr
|
||||||
dite
|
dite
|
||||||
div
|
div
|
||||||
|
division
|
||||||
empty
|
empty
|
||||||
empty.rec
|
empty.rec
|
||||||
eq
|
eq
|
||||||
|
|
Loading…
Reference in a new issue