SDDecl
token, without the initial S
token.
# Expect a `SDDecl` token, without the initial `S` token.
private fun expect_sd_decl: Bool do
var buf = new FlatBuffer
var value: String
if not lexer.expect_string("standalone", "") or not lexer.expect_eq or
not expect_literal(buf) then
return false
end
value = buf.to_s
if not value == "yes" and not value == "no" then
return model.fire_fatal_error("`{value}` is not a valid value for " +
"the `standalone` declaration. Expecting `yes` or `no`.",
null)
end
# TODO: Do something with the value.
return true
end
lib/saxophonit/saxophonit.nit:567,2--584,4