diff options
Diffstat (limited to 'parser.fun')
-rw-r--r-- | parser.fun | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -235,6 +235,9 @@ functor Parser(structure Tree: TREE; structure P: PPC; in case t of remote_t id => resolve id + | array_t (n, elT) => array_t (n, resolveType elT) + | function_t (rt, args, variadic) => + function_t (resolveType rt, map resolveType args, variadic) | t => t end @@ -1511,7 +1514,7 @@ functor Parser(structure Tree: TREE; structure P: PPC; end and isLvalue (EA (_, _, lvalue, _)) = lvalue - and getT (EA (_, _, _, t)) = t + and getT (EA (_, _, _, t)) = resolveType t and getPos (EA (_, pos, _, _)) = pos and setT (EA (binop, pos, lvalue, _)) t = EA (binop, pos, lvalue, t) @@ -1703,7 +1706,7 @@ functor Parser(structure Tree: TREE; structure P: PPC; else P.error (getPos right) `"expression has a type incompatible with its sibling: " - `"(" Pctype leftT `", >" Pctype rightT `")" % + `"(" Pctype leftT `", >>" Pctype rightT `")" % else P.error (getPos left) `"expected value of an arithmetic type or a pointer" % @@ -2235,9 +2238,7 @@ functor Parser(structure Tree: TREE; structure P: PPC; and eval' (EA (e, pos, _, t)) = case e of Eid _ => P.error pos `"variable in constant expression" % - | Econst (_, Ninteger w) => - (printf `"eval num: " W w `": " Pctype t `"\n" %; - ER (w, t)) + | Econst (_, Ninteger w) => ER (w, t) | Econst _ => raise Unreachable | Estrlit _ => P.error pos `"string literal in constant expression" % | EmemberByV _ | EmemberByP _ => |