package JSON::Decode::Regexp;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-08-01'; # DATE
our $DIST = 'JSON-Decode-Regexp'; # DIST
our $VERSION = '0.102'; # VERSION
use 5.014004;
s;
#use Data::Dumper;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(from_json);
sub _fail { die __PACKAGE__.": $_[0] at offset ".pos()."\n" }
my %escape_codes = (
"\\" =
$escape_codes{$4} ? $escape_codes{$4} :
$1]eg;
$str;
}
our $FROM_JSON = qr{
(?:
(?&VALUE) (?{ $_ = $^R->[1] })
|
\z (?{ _fail "Unexpected end of input" })
|