aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 16:15:52 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 16:15:52 +0330
commit79de454a7df8bd2862d32835db89ed06de8e7b33 (patch)
tree59dd8fdfb401160d8e4f79867e52abc309187998 /src/tools
parentzc0: reject .u on a typed parameter with the compiler's message (diff)
zc0: x as T reads a whole type (x as int*, x as char**)
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/zc0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/zc0.c b/src/tools/zc0.c
index 20dcbf9..f28c655 100644
--- a/src/tools/zc0.c
+++ b/src/tools/zc0.c
@@ -637,7 +637,7 @@ static void postfix(void)
else if (is("(")) { rval(); n = args(); lit(n); op(O_PICK); op(O_CALL); op(O_SWAP); op(O_DROP); xf = 0; xs = 0; lvi = -1; }
else if (accept("++")) incdec(1, 1);
else if (accept("--")) incdec(1, -1);
- else if (accept("as")) ident();
+ else if (accept("as")) ptype0(); /* the whole type, as the compiler reads it: x as int*, x as char** */
else return;
}
}