| 1 |
wakaba |
1.1 |
package WebHACC::Language::Default; |
| 2 |
|
|
use strict; |
| 3 |
|
|
require WebHACC::Language::Base; |
| 4 |
|
|
push our @ISA, 'WebHACC::Language::Base'; |
| 5 |
|
|
|
| 6 |
|
|
sub new ($) { |
| 7 |
|
|
my $self = bless {}, shift; |
| 8 |
|
|
return $self; |
| 9 |
|
|
} # new |
| 10 |
|
|
|
| 11 |
|
|
sub generate_parse_error_section ($) { |
| 12 |
|
|
my $self = shift; |
| 13 |
|
|
|
| 14 |
|
|
my $out = shift; |
| 15 |
|
|
|
| 16 |
|
|
$out->start_section (id => 'parse-errors', title => 'Errors'); |
| 17 |
|
|
$out->start_tag ('dl'); |
| 18 |
|
|
|
| 19 |
|
|
## TODO: |
| 20 |
|
|
$out->start_tag ('dt', class => 'unsupported'); |
| 21 |
|
|
$out->url ($input->{uri}); |
| 22 |
|
|
$out->html (q[<dd class=unsupported><strong><a href="../error-description#level-u">Not |
| 23 |
|
|
supported</a></strong>: |
| 24 |
|
|
Media type |
| 25 |
|
|
<code class="MIME" lang="en">]); |
| 26 |
|
|
$out->text ($input->{media_type}); |
| 27 |
|
|
$out->html (q[</code> is not supported.]); |
| 28 |
|
|
$out->end_tag ('dl'); |
| 29 |
|
|
$out->end_section; |
| 30 |
|
|
|
| 31 |
|
|
my $result = $self->result; |
| 32 |
|
|
|
| 33 |
|
|
add_error (char => {level => 'u'} => $result); |
| 34 |
|
|
add_error (syntax => {level => 'u'} => $result); |
| 35 |
|
|
add_error (structure => {level => 'u'} => $result); |
| 36 |
|
|
} # generate_parse_error_section |
| 37 |
|
|
|
| 38 |
|
|
sub generate_structure_error_section ($) { } |
| 39 |
|
|
|
| 40 |
|
|
1; |