13 |
|
|
14 |
require Whatpm::WebIDL; |
require Whatpm::WebIDL; |
15 |
|
|
16 |
|
$self->result->layer_uncertain ('encode'); |
17 |
|
$self->result->layer_uncertain ('charset'); |
18 |
|
|
19 |
my $out = $self->output; |
my $out = $self->output; |
20 |
$out->start_section (id => 'parse-errors', title => 'Parse Errors'); |
$out->start_section (role => 'parse-errors'); |
21 |
$out->start_tag ('dl', id => 'parse-errors-list'); |
$out->start_error_list (role => 'parse-errors'); |
22 |
|
$self->result->layer_applicable ('syntax'); |
23 |
|
|
24 |
my $input = $self->input; |
my $input = $self->input; |
25 |
my $result = $self->result; |
my $result = $self->result; |
32 |
$result->add_error (@_, layer => 'syntax'); |
$result->add_error (@_, layer => 'syntax'); |
33 |
}); |
}); |
34 |
|
|
35 |
$out->html ('</dl></div>'); |
$out->end_error_list (role => 'parse-errors'); |
36 |
|
$out->end_section; |
37 |
} # generate_parse_error_section |
} # generate_parse_error_section |
38 |
|
|
39 |
sub generate_structure_dump_section ($) { |
sub generate_structure_dump_section ($) { |
40 |
my $self = shift; |
my $self = shift; |
41 |
|
|
42 |
my $out = $self->output; |
my $out = $self->output; |
43 |
|
|
44 |
$out->start_section (id => 'dump-webidl', title => 'WebIDL'); |
$out->start_section (role => 'reformatted'); |
45 |
|
|
46 |
$out->start_code_block; |
$out->start_code_block; |
47 |
$out->text ($self->{structure}->idl_text); |
$out->text ($self->{structure}->idl_text); |
48 |
$out->end_code_block; |
$out->end_code_block; |
49 |
|
|
50 |
$out->end_section |
$out->end_section |
51 |
} # generate_structure_dump_section |
} # generate_structure_dump_section |
52 |
|
|
53 |
|
sub generate_structure_error_section ($) { |
54 |
|
my $self = shift; |
55 |
|
|
56 |
|
my $out = $self->output; |
57 |
|
|
58 |
|
$out->start_section (role => 'structure-errors'); |
59 |
|
$out->start_error_list (role => 'structure-errors'); |
60 |
|
$self->result->layer_applicable ('structure'); |
61 |
|
|
62 |
|
$self->{structure}->check (sub { |
63 |
|
$self->result->add_error (@_, layer => 'structure'); |
64 |
|
}); |
65 |
|
|
66 |
|
$out->end_error_list (role => 'structure-errors'); |
67 |
|
$out->end_section; |
68 |
|
} # generate_structure_error_section |
69 |
|
|
70 |
1; |
1; |