mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
parser api wip
This commit is contained in:
parent
81f7ce8df9
commit
42358f243b
12 changed files with 52 additions and 56 deletions
|
|
@ -26,7 +26,7 @@ impl MessageHandler for SendPropAnalyser {
|
|||
false
|
||||
}
|
||||
|
||||
fn get_output(self, state: &ParserState) -> Self::Output {
|
||||
fn into_output(&self, state: &ParserState) -> Self::Output {
|
||||
state
|
||||
.send_tables
|
||||
.iter()
|
||||
|
|
@ -43,8 +43,7 @@ fn flatten_bench(input_file: &str, b: &mut Bencher) {
|
|||
let file = fs::read(input_file).expect("Unable to read file");
|
||||
let demo = Demo::new(file);
|
||||
let stream = demo.get_stream();
|
||||
let (_, send_tables) =
|
||||
DemoParser::parse_with_analyser(stream.clone(), SendPropAnalyser).unwrap();
|
||||
let (_, send_tables) = DemoParser::new_with_analyser(stream.clone(), SendPropAnalyser).unwrap();
|
||||
b.iter(|| {
|
||||
let flat: Vec<_> = send_tables
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue