Class: Gammo::Parser::AfterAfterBody
Overview
Instance Attribute Summary
#parser
Instance Method Summary
collapse
#initialize, #process
Instance Method Details
#character_token(token) ⇒ Object
10
11
12
|
# File 'lib/gammo/parser/insertion_mode/after_after_body.rb', line 10
def character_token(token)
halt InBody.new(parser).process if token.data.lstrip.length.zero?
end
|
21
22
23
24
|
# File 'lib/gammo/parser/insertion_mode/after_after_body.rb', line 21
def (token)
parser.document.append_child Node::.new(data: token.data)
halt true
end
|
#default(_) ⇒ Object
30
31
32
33
|
# File 'lib/gammo/parser/insertion_mode/after_after_body.rb', line 30
def default(_)
parser.insertion_mode = InBody
halt false
end
|
#doctype_token(token) ⇒ Object
26
27
28
|
# File 'lib/gammo/parser/insertion_mode/after_after_body.rb', line 26
def doctype_token(token)
halt InBody.new(parser).process
end
|
#error_token(_) ⇒ Object
5
6
7
8
|
# File 'lib/gammo/parser/insertion_mode/after_after_body.rb', line 5
def error_token(_)
halt true
end
|
#start_tag_token(token) ⇒ Object
14
15
16
17
18
19
|
# File 'lib/gammo/parser/insertion_mode/after_after_body.rb', line 14
def start_tag_token(token)
case token.tag
when Tags::Html
halt InBody.new(parser).process
end
end
|