From 757a701c1aa2a6fb80033c7e75666661818da6f9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 20 Sep 2022 13:05:55 +0200 Subject: A New World --- src/parse/parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parse/parser.rs') diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 685f1e69..90b6e610 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -30,15 +30,15 @@ pub struct Parser<'s> { impl<'s> Parser<'s> { /// Create a new parser for the source string. - pub fn new(src: &'s str, mode: TokenMode) -> Self { - Self::with_prefix("", src, mode) + pub fn new(text: &'s str, mode: TokenMode) -> Self { + Self::with_prefix("", text, mode) } /// Create a new parser for the source string that is prefixed by some text /// that does not need to be parsed but taken into account for column /// calculation. - pub fn with_prefix(prefix: &str, src: &'s str, mode: TokenMode) -> Self { - let mut tokens = Tokens::with_prefix(prefix, src, mode); + pub fn with_prefix(prefix: &str, text: &'s str, mode: TokenMode) -> Self { + let mut tokens = Tokens::with_prefix(prefix, text, mode); let current = tokens.next(); Self { tokens, -- cgit v1.2.3