summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/parsing.rs4
-rw-r--r--src/syntax/tokens.rs3
2 files changed, 2 insertions, 5 deletions
diff --git a/src/syntax/parsing.rs b/src/syntax/parsing.rs
index 8dd567d3..65e860cf 100644
--- a/src/syntax/parsing.rs
+++ b/src/syntax/parsing.rs
@@ -177,7 +177,7 @@ impl Parser<'_> {
self.eat();
self.skip_white();
- (Some(ident), try_opt_or!(self.parse_expr(), {
+ (Some(ident), try_or!(self.parse_expr(), {
self.expected("value");
continue;
}))
@@ -191,7 +191,7 @@ impl Parser<'_> {
_ => (None, ident.map(|id| Expr::Ident(id)))
}
} else {
- (None, try_opt_or!(self.parse_expr(), {
+ (None, try_or!(self.parse_expr(), {
self.expected("value");
continue;
}))
diff --git a/src/syntax/tokens.rs b/src/syntax/tokens.rs
index a27ef982..50eea455 100644
--- a/src/syntax/tokens.rs
+++ b/src/syntax/tokens.rs
@@ -153,9 +153,6 @@ pub enum TokenMode {
impl<'s> Tokens<'s> {
/// Create a new token iterator with the given mode.
- ///
- /// The first token's span starts an the given `offset` position instead of
- /// the zero position.
pub fn new(src: &'s str, mode: TokenMode) -> Self {
Self {
src,