Make more functions const.

This commit is contained in:
Stephen Chung
2021-06-29 23:17:31 +08:00
parent bd35999b75
commit fc349f67f8
6 changed files with 14 additions and 14 deletions

View File

@@ -143,7 +143,7 @@ impl<'e> ParseState<'e> {
///
/// Return `None` when the variable name is not found in the `stack`.
#[inline(always)]
fn access_var(&mut self, name: &str, _pos: Position) -> Option<NonZeroUsize> {
pub fn access_var(&mut self, name: &str, _pos: Position) -> Option<NonZeroUsize> {
let mut barrier = false;
let index = self