'?>'
token of a PI
production.
# Expect the data part and the `'?>'` token of a `PI` production.
private fun expect_pi_data(target: String): Bool do
if lexer.accept('?') then
if lexer.expect('>', " at the end of a processing instruction") then
model.fire_processing_instruction(target, null)
return true
else
return false
end
else if lexer.accept_s then
var data: Buffer = new FlatBuffer
loop
if lexer.accept('?') then
if lexer.accept('>') then
break
else
data.chars.push('?')
if not lexer.expect_xml_char(data) then return false
end
else if not lexer.expect_xml_char(data) then
return false
end
end
model.fire_processing_instruction(target, data.to_s)
return true
else
return lexer.fire_unexpected_char(" after a processing " +
"instruction target. Expecting a white space or `?>`")
end
end
lib/saxophonit/saxophonit.nit:479,2--509,4