| 1 | #!perl | ||||||||||||||
| 2 | 259 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | 259 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 259 | ▶ | use Getopt::Long 'GetOptions'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 259 | ▶ | use Lox; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | |||||||||||||||
| 7 | 259 | GetOptions( | |||||||||||||
| 8 | 'debug' => \my $debug, | ||||||||||||||
| 9 | ); | ||||||||||||||
| 10 | |||||||||||||||
| 11 | 259 | ▶ | if (@ARGV > 1) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 12 | 0 | print "Usage: plox [script]\n"; | |||||||||||||
| 13 | 0 | exit 64; | |||||||||||||
| 14 | } | ||||||||||||||
| 15 | elsif (@ARGV == 1) { | ||||||||||||||
| 16 | 259 | Lox::run_file($ARGV[0], $debug); | |||||||||||||
| 17 | } | ||||||||||||||
| 18 | else { | ||||||||||||||
| 19 | 0 | Lox::run_prompt($debug); | |||||||||||||
| 20 | } | ||||||||||||||