aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/mod.rs
diff options
context:
space:
mode:
authorAdolfo OchagavĂ­a <[email protected]>2018-11-04 14:06:38 +0000
committerAdolfo OchagavĂ­a <[email protected]>2018-11-04 14:17:24 +0000
commit9b5bbab104d8ba445143f6f3a9e4149b40c29ae5 (patch)
treea1ef0fa5dbfd431e8a58afc6542c32c9ecefed04 /crates/ra_syntax/src/ast/mod.rs
parent19c6cbd9540ef87850161cad7e108b380eceea24 (diff)
Add character literal parsing and validation
Diffstat (limited to 'crates/ra_syntax/src/ast/mod.rs')
-rw-r--r--crates/ra_syntax/src/ast/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/mod.rs b/crates/ra_syntax/src/ast/mod.rs
index 688ffff47..4355531d0 100644
--- a/crates/ra_syntax/src/ast/mod.rs
+++ b/crates/ra_syntax/src/ast/mod.rs
@@ -123,6 +123,12 @@ impl<'a> Lifetime<'a> {
123 } 123 }
124} 124}
125 125
126impl<'a> Char<'a> {
127 pub fn text(&self) -> &SmolStr {
128 &self.syntax().leaf_text().unwrap()
129 }
130}
131
126impl<'a> Comment<'a> { 132impl<'a> Comment<'a> {
127 pub fn text(&self) -> &SmolStr { 133 pub fn text(&self) -> &SmolStr {
128 self.syntax().leaf_text().unwrap() 134 self.syntax().leaf_text().unwrap()