expect_xml_char
, but normalize white space and forbid <
.SEE: The “3.3.3 Attribute-Value Normalization” section of any XML recommendation.
# Like `expect_xml_char`, but normalize white space and forbid `<`.
#
# SEE: The “3.3.3 Attribute-Value Normalization” section of any XML
# recommendation.
fun expect_att_value_char(buffer: Buffer): Bool do
if is_s then
buffer.chars.push(' ')
read_char
return true
else if last_char == '<'.code_point then
return fire_fatal_error("`<` is forbidden in attribute values.")
else
return expect_xml_char(buffer)
end
end
lib/saxophonit/lexer.nit:85,2--99,4