chore(els): HIRVisitor::get_min_expr takes position instead of token

This commit is contained in:
Shunsuke Shibayama 2023-08-30 13:14:04 +09:00
parent b746cd38bd
commit 6cfae0066b
9 changed files with 133 additions and 145 deletions

View file

@ -8,7 +8,7 @@ use erg_common::cache::CacheSet;
use erg_common::config::ErgConfig;
use erg_common::io::Input;
use erg_common::traits::DequeStream;
use erg_common::traits::{Locational, Runnable, Stream};
use erg_common::traits::{Runnable, Stream};
use erg_common::{debug_power_assert, fn_name_full, normalize_newline, switch_lang};
use crate::error::{LexError, LexErrors, LexResult, LexerRunnerError, LexerRunnerErrors};

View file

@ -514,6 +514,10 @@ impl Token {
&& self.col_begin == other.col_begin
}
pub fn loc(&self) -> Location {
Locational::loc(self)
}
pub const fn category(&self) -> TokenCategory {
self.kind.category()
}