impl BoolLit { /// Parses the input as a bool literal. Returns an error if the input is /// invalid or represents a different kind of literal. pubfn parse(s: &str) -> Result<Self, ParseError> { match s { "false" => Ok(Self::False), "true" => Ok(Self::True),
_ => Err(perr(None, InvalidLiteral)),
}
}
/// Returns the actual Boolean value of this literal. pubfn value(self) -> bool { matchself { Self::False => false, Self::True => true,
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.