mirror of
https://github.com/fluencelabs/lalrpop
synced 2025-03-28 06:01:02 +00:00
feat: states does not need to be passed to reduce actions
This commit is contained in:
parent
f69bce3080
commit
c156b4b2fd
@ -821,7 +821,7 @@ impl<'ascent, 'grammar, W: Write> CodeGenerator<'ascent, 'grammar, W, TableDrive
|
|||||||
let phantom_data_expr = self.phantom_data_expr();
|
let phantom_data_expr = self.phantom_data_expr();
|
||||||
rust!(
|
rust!(
|
||||||
self.out,
|
self.out,
|
||||||
"{p}reduce{}({}{p}lookahead_start, {p}states, {p}symbols, {})",
|
"{p}reduce{}({}{p}lookahead_start, {p}symbols, {})",
|
||||||
index,
|
index,
|
||||||
self.grammar.user_parameter_refs(),
|
self.grammar.user_parameter_refs(),
|
||||||
phantom_data_expr,
|
phantom_data_expr,
|
||||||
@ -911,10 +911,6 @@ impl<'ascent, 'grammar, W: Write> CodeGenerator<'ascent, 'grammar, W, TableDrive
|
|||||||
|
|
||||||
let parameters = vec![
|
let parameters = vec![
|
||||||
format!("{}lookahead_start: Option<&{}>", self.prefix, loc_type),
|
format!("{}lookahead_start: Option<&{}>", self.prefix, loc_type),
|
||||||
format!(
|
|
||||||
"{}states: &mut ::std::vec::Vec<{}>",
|
|
||||||
self.prefix, self.custom.state_type
|
|
||||||
),
|
|
||||||
format!(
|
format!(
|
||||||
"{}symbols: &mut ::std::vec::Vec<{}>",
|
"{}symbols: &mut ::std::vec::Vec<{}>",
|
||||||
self.prefix, spanned_symbol_type
|
self.prefix, spanned_symbol_type
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user