This repository was archived by the owner on Feb 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-23
lines changed Expand file tree Collapse file tree 1 file changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -415,29 +415,17 @@ class HLL::Compiler {
415
415
}
416
416
417
417
method process_args (@ args ) {
418
- Q : PIR {
419
- load_bytecode 'Getopt/Obj.pbc'
420
-
421
- .local pmc args
422
- args = find_lex '@args'
423
- .local string arg0
424
- arg0 = shift args
425
- self.'compiler_progname'(arg0)
426
-
427
- .local pmc getopts
428
- getopts = new ['Getopt';'Obj']
429
- getopts.'notOptStop'(1)
430
- $P0 = getattribute self, '@!cmdoptions'
431
- .local pmc it
432
- it = iter $P0
433
- getopts_loop :
434
- unless it goto getopts_end
435
- $ S0 = shift it
436
- push getopts, $ S0
437
- goto getopts_loop
438
- getopts_end:
439
- . tailcall getopts. ' get_options' (args)
440
- };
418
+ # First argument is the program name.
419
+ self . compiler_progname(@ args . shift );
420
+
421
+ # Use Getopt::Obj to proccess the rest.
422
+ pir::load_bytecode(' Getopt/Obj.pbc' );
423
+ my $ getopts := Q : PIR { %r = new ['Getopt';'Obj'] };
424
+ $getopts.notOptStop(1);
425
+ for @!cmdoptions {
426
+ pir : :push__vPs($ getopts , $ _ )
427
+ }
428
+ $ getopts . get_options(@ args );
441
429
}
442
430
443
431
method evalfiles (@ files , * @ args , * % adverbs ) {
You can’t perform that action at this time.
0 commit comments