1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

[FunC] Change some fields to enums instead of integers

It makes it easier to understand/debug
Also, drop some unused enum values from that cases
This commit is contained in:
Aleksandr Kirsanov 2024-04-16 21:52:11 +03:00
parent 5c392e0f2d
commit 0bc6305f96
No known key found for this signature in database
GPG key ID: B758BBAA01FFB3D3
5 changed files with 42 additions and 48 deletions

View file

@ -580,7 +580,7 @@ Expr* parse_expr100(Lexer& lex, CodeBlob& code, bool nv) {
if (t == '_') {
Expr* res = new Expr{Expr::_Hole, lex.cur().loc};
res->val = -1;
res->flags = (Expr::_IsLvalue | Expr::_IsHole | Expr::_IsNewVar);
res->flags = Expr::_IsLvalue;
res->e_type = TypeExpr::new_hole();
lex.next();
return res;
@ -642,7 +642,7 @@ Expr* parse_expr100(Lexer& lex, CodeBlob& code, bool nv) {
if (nv) {
res->val = ~lex.cur().val;
res->e_type = TypeExpr::new_hole();
res->flags = Expr::_IsLvalue | Expr::_IsNewVar;
res->flags = Expr::_IsLvalue;
// std::cerr << "defined new variable " << lex.cur().str << " : " << res->e_type << std::endl;
} else {
if (!sym) {