From b0241ee7425b1c9be3ae8ed1c3bb7c54214aef77 Mon Sep 17 00:00:00 2001 From: ydah Date: Sat, 4 May 2024 21:21:01 +0900 Subject: [PATCH] Enclose in parentheses where you assign in the if condition --- lib/lrama/grammar/rule_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lrama/grammar/rule_builder.rb b/lib/lrama/grammar/rule_builder.rb index ccb41e67..65b3aab8 100644 --- a/lib/lrama/grammar/rule_builder.rb +++ b/lib/lrama/grammar/rule_builder.rb @@ -174,7 +174,7 @@ def lhs_s_value(token, bindings) def resolve_inline(parameterizing_rule_resolver) rhs.each_with_index do |token, i| - if inline_rule = parameterizing_rule_resolver.find_inline(token) + if (inline_rule = parameterizing_rule_resolver.find_inline(token)) inline_rule.rhs_list.each_with_index do |inline_rhs| rule_builder = RuleBuilder.new(@rule_counter, @midrule_action_counter, lhs_tag: lhs_tag, skip_preprocess_references: true) resolve_inline_rhs(rule_builder, inline_rhs, i)