mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Update ErgConfig
and Runnable
This commit is contained in:
parent
d7ffb211a8
commit
d2ad7caaab
8 changed files with 42 additions and 26 deletions
|
@ -27,8 +27,8 @@ impl Runnable for LexerRunner {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn input(&self) -> &Input {
|
||||
&self.cfg.input
|
||||
fn cfg(&self) -> &ErgConfig {
|
||||
&self.cfg
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -178,8 +178,8 @@ impl Runnable for ParserRunner {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn input(&self) -> &Input {
|
||||
&self.cfg.input
|
||||
fn cfg(&self) -> &ErgConfig {
|
||||
&self.cfg
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -53,6 +53,8 @@ fn parse_test_from_code(file_path: &'static str) -> Result<(), ParserRunnerError
|
|||
input: input.clone(),
|
||||
module: "<module>",
|
||||
verbose: 2,
|
||||
ps1: ">>> ",
|
||||
ps2: "... ",
|
||||
};
|
||||
let lexer = Lexer::new(input.clone());
|
||||
let mut parser = ParserRunner::new(cfg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue