feat: states does not need to be passed to reduce actions

This commit is contained in:
Markus Westerlind 2020-03-03 11:14:08 +01:00
parent f69bce3080
commit c156b4b2fd
2 changed files with 500 additions and 1003 deletions

View File

@ -821,7 +821,7 @@ impl<'ascent, 'grammar, W: Write> CodeGenerator<'ascent, 'grammar, W, TableDrive
let phantom_data_expr = self.phantom_data_expr();
rust!(
self.out,
"{p}reduce{}({}{p}lookahead_start, {p}states, {p}symbols, {})",
"{p}reduce{}({}{p}lookahead_start, {p}symbols, {})",
index,
self.grammar.user_parameter_refs(),
phantom_data_expr,
@ -911,10 +911,6 @@ impl<'ascent, 'grammar, W: Write> CodeGenerator<'ascent, 'grammar, W, TableDrive
let parameters = vec![
format!("{}lookahead_start: Option<&{}>", self.prefix, loc_type),
format!(
"{}states: &mut ::std::vec::Vec<{}>",
self.prefix, self.custom.state_type
),
format!(
"{}symbols: &mut ::std::vec::Vec<{}>",
self.prefix, spanned_symbol_type

File diff suppressed because it is too large Load Diff