Index: compilers/pct/src/PAST/Compiler.pir =================================================================== --- compilers/pct/src/PAST/Compiler.pir (revision 37820) +++ compilers/pct/src/PAST/Compiler.pir (working copy) @@ -91,6 +91,7 @@ valflags['String'] = 's~*:e' valflags['Integer'] = 'i+*:' valflags['Float'] = 'n+*:' + valflags['Complex'] = 's~*:e' set_global '%valflags', valflags ## %!controltypes holds the list of exception types for each Index: t/compilers/pct/complete_workflow.t =================================================================== --- t/compilers/pct/complete_workflow.t (revision 37820) +++ t/compilers/pct/complete_workflow.t (working copy) @@ -8,7 +8,7 @@ use Test::More; -use Parrot::Test tests => 6 * 9; +use Parrot::Test tests => 7 * 9; use Parrot::Test::Util 'create_tempfile'; use Parrot::Config qw(%PConfig); @@ -32,6 +32,31 @@ { test_pct( 'sanity', <<'IN', <<'GRAMMAR', <<'ACTIONS', <<'OUT' ); +10i +IN +token TOP { '10i' {*} } +GRAMMAR + +method TOP($/) { + my $past := PAST::Stmts.new( + PAST::Op.new( + PAST::Val.new( + :value( ~$/ ), + :returns('Complex') + ), + :pirop('say'), + ) + ); + + make $past; +} +ACTIONS +0+10i +OUT +} + +{ + test_pct( 'sanity', <<'IN', <<'GRAMMAR', <<'ACTIONS', <<'OUT' ); thingy IN token TOP { 'thingy' {*} }