Comment
production, without the beginning.Assume last_char
is the fifth byte of the production that is, the
next byte after the '<!--'
token.
# Expect a `Comment` production, without the beginning.
#
# Assume `last_char` is the fifth byte of the production that is, the
# next byte after the `'<!--'` token.
private fun expect_comment: Bool do
var buffer: Buffer = new FlatBuffer
loop
if lexer.accept('-') then
if lexer.accept('-') then
if not lexer.expect('>',
" after a double-hyphen (`--`) in a comment") then
return false
else
break
end
else
buffer.chars.push('-')
if not lexer.expect_xml_char(buffer) then return false
end
else if not lexer.expect_xml_char(buffer) then
return false
end
end
model.fire_comment(buffer.to_s)
return true
end
lib/saxophonit/saxophonit.nit:440,2--466,4