needs tests/harness comp/oberon comp/oberon/ast comp/oberon/cexpr testbegin obtok$ : ast<; ast< read; ; : ?cexpr< ast<; ?cexpr ; : #iscexpr ( f -- ) not ?abort"not a cexpr" ; \test asttype on [] operator oberon< MODULE Test; VAR a: ARRAY 3 OF INTEGER; END Test. ast<; a[1]; asttype INTEGER #eq \test asttype on VAL/ORD/CHR ast<; VAL(OPAQUE,foo); asttype OPAQUE #eq ast<; ORD(foo); asttype BYTE #eq ast<; CHR(foo); asttype CHAR #eq ast<; LEN(foo); asttype INTEGER #eq \test simple ?cexprs ?cexpr< 42; #iscexpr 42 #eq ?cexpr< 'X'; #iscexpr 'X' #eq ?cexpr< -8; #iscexpr -8 #eq ?cexpr< ~0; #iscexpr 1 #eq ?cexpr< {1,3}; #iscexpr $a #eq ?cexpr< {1,12..14}; #iscexpr $7002 #eq ?cexpr< 10-3; #iscexpr 7 #eq ?cexpr< {12..14}-{13}; #iscexpr $5000 #eq ?cexpr< ASR(800000002X,1); #iscexpr $c00000001 #eq ?cexpr< 2 IN {1,3}; #iscexpr 0 #eq ?cexpr< 2 IN {1..3}; #iscexpr 1 #eq \test ident of VAR argument aren't noopexprs \ They're going to be auto-dereferenced in expr.fs oberon< MODULE Test; PROCEDURE foo(VAR vararg:INTEGER); BEGIN END foo; END Test. ast<; vararg; ?noopexpr not #true ast<; vararg; asttype INTEGER #eq testend