| 1 | package Perlito5::Compiler; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | use Perlito5; | ||
| 6 | use Perlito5::Match; | ||
| 7 | use Perlito5::Grammar; | ||
| 8 | use Perlito5::Grammar::Statement; | ||
| 9 | use Perlito5::Grammar::Control; | ||
| 10 | use Perlito5::Grammar::Precedence; | ||
| 11 | use Perlito5::Grammar::Expression; | ||
| 12 | use Perlito5::Grammar::CORE; | ||
| 13 | use Perlito5::Macro; | ||
| 14 | use Perlito5::Regex; | ||
| 15 | use Perlito5::Runtime; | ||
| 16 | use Perlito5::AST::CompileTime; | ||
| 17 | use Perlito5::Dumper; | ||
| 18 | use Perlito5::CompileTime::Dumper; | ||
| 19 | |||
| 20 | sub compiler_name { | ||
| 21 | "Perlito5" | ||
| 22 | } | ||
| 23 | |||
| 24 | sub do_not_edit { | ||
| 25 | my $prefix = shift; | ||
| 26 | return "$prefix Do not edit this file - Generated by " . compiler_name() . " $Perlito5::VERSION\n"; | ||
| 27 | } | ||
| 28 | |||
| 29 | sub error { | ||
| 30 | die join('', @_) . ' at ' . $Perlito5::FILE_NAME . ' line ' . $Perlito5::LINE_NUMBER . "\n"; | ||
| 31 | } | ||
| 32 | |||
| 33 | sub compiler_pos { | ||
| 34 | return { | ||
| 35 | file => $Perlito5::FILE_NAME, | ||
| 36 | line => $Perlito5::LINE_NUMBER, | ||
| 37 | }; | ||
| 38 | } | ||
| 39 | |||
| 40 | 1; | ||
| 41 | |||
| 42 | __END__ |