Push the last read byte in the specified buffer and read the next byte.

If the last read byte is forbidden, fire a fatal error instead.

Property definitions

saxophonit $ XophonLexer :: expect_xml_char
	# Push the last read byte in the specified buffer and read the next byte.
	#
	# If the last read byte is forbidden, fire a fatal error instead.
	fun expect_xml_char(buffer: Buffer): Bool do
		if is_xml_char then
			buffer.chars.push(last_char.code_point)
			read_char
			return true
		else if eof then
			return fire_fatal_error("Unexpected end of file.")
		else
			return fire_fatal_error("Forbidden character.")
		end
	end
lib/saxophonit/lexer.nit:69,2--82,4