Add character literal parsing and validation

This commit is contained in:
Adolfo Ochagavía
2018-11-04 15:06:38 +01:00
parent 19c6cbd954
commit 9b5bbab104
6 changed files with 397 additions and 2 deletions

View File

@@ -123,6 +123,12 @@ impl<'a> Lifetime<'a> {
}
}
impl<'a> Char<'a> {
pub fn text(&self) -> &SmolStr {
&self.syntax().leaf_text().unwrap()
}
}
impl<'a> Comment<'a> {
pub fn text(&self) -> &SmolStr {
self.syntax().leaf_text().unwrap()