diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-09-20 13:05:55 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-09-20 16:37:15 +0200 |
| commit | 757a701c1aa2a6fb80033c7e75666661818da6f9 (patch) | |
| tree | 0415fec94d3856f4ebc97a1744cf2ba75fe8e7aa /src/parse/parser.rs | |
| parent | e29f55bb294cc298daad97accf6d8a76976b409c (diff) | |
A New World
Diffstat (limited to 'src/parse/parser.rs')
| -rw-r--r-- | src/parse/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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, |
