aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parser_api.rs
diff options
context:
space:
mode:
authorcsmoe <[email protected]>2018-12-31 12:53:43 +0000
committercsmoe <[email protected]>2018-12-31 13:00:05 +0000
commitea7b569e1b133b6c19ef60c9cb2b2fd6b79847da (patch)
tree8c2ad080054f30104c1da78f16aa3d3d5185a49d /crates/ra_syntax/src/parser_api.rs
parent582ea0a29a2914ab0b6847121b91396a4e8bebc5 (diff)
docing parser methods
Diffstat (limited to 'crates/ra_syntax/src/parser_api.rs')
-rw-r--r--crates/ra_syntax/src/parser_api.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/parser_api.rs b/crates/ra_syntax/src/parser_api.rs
index 02421def1..0f740963d 100644
--- a/crates/ra_syntax/src/parser_api.rs
+++ b/crates/ra_syntax/src/parser_api.rs
@@ -61,7 +61,7 @@ impl<'t> Parser<'t> {
61 Marker::new(self.0.start()) 61 Marker::new(self.0.start())
62 } 62 }
63 63
64 /// Advances the parser by one token. 64 /// Advances the parser by one token unconditionally.
65 pub(crate) fn bump(&mut self) { 65 pub(crate) fn bump(&mut self) {
66 self.0.bump(); 66 self.0.bump();
67 } 67 }
@@ -91,7 +91,7 @@ impl<'t> Parser<'t> {
91 self.0.error(message.into()) 91 self.0.error(message.into())
92 } 92 }
93 93
94 /// Consume the next token if it is `kind`. 94 /// Consume the next token if `kind` matches.
95 pub(crate) fn eat(&mut self, kind: SyntaxKind) -> bool { 95 pub(crate) fn eat(&mut self, kind: SyntaxKind) -> bool {
96 if !self.at(kind) { 96 if !self.at(kind) {
97 return false; 97 return false;