@@ -11,39 +11,18 @@ method proc(*@args) {
1111 Partcl::Compiler. parse( $ body , : rule<TOP_proc >, : actions(Partcl::Actions) );
1212 my $ block := $ parse . ast;
1313 my @ params := $ args . getList();
14- my @ argsInfo := pir::new__PS( ' TclList' );
15- my % defaults := pir::new__PS( ' TclArray' );
14+ my @ argsInfo := TclList. new ( );
15+ my % defaults := TclArray. new ( );
1616
1717 for @ params {
1818 my @ argument := $ _ . getList();
1919
2020 if + @ argument == 1 {
21- $ block [0 ]. push (
22- PAST::Op. new ( : pasttype<bind >,
23- PAST::Var. new ( : scope<keyed >,
24- PAST::Var. new ( : name(' lexpad' ), : scope<register > ),
25- $ _
26- ),
27- PAST::Var. new ( : scope<parameter > )
28- )
29- );
30- @ argsInfo . push ($ _ );
31- % defaults {$ _ } := pir::new__PS(' Undef' );
21+ # TODO: Add an argument declaration for this parameter.
22+ # default to an undef if no value passed.
3223 } elsif + @ argument == 2 {
33- $ block [0 ]. push (
34- PAST::Op. new ( : pasttype<bind >,
35- PAST::Var. new ( : scope<keyed >,
36- PAST::Var. new ( : name(' lexpad' ), : scope<register > ),
37- @ argument [0 ]
38- ),
39- PAST::Var. new (
40- : scope<parameter >,
41- : viviself(PAST::Val. new ( : value(@ argument [1 ]) ))
42- )
43- )
44- );
45- @ argsInfo . push (@ argument [0 ]);
46- % defaults {@ argument [0 ]} := @ argument [1 ];
24+ # TODO: Add an argument declaration for this parameter.
25+ # default to the second value
4726 } else {
4827 self . error(" too many fields in argument specifier \" $ _\" " );
4928 }
0 commit comments