Skip to content

Commit 95923b1

Browse files
Update cc_parser_cc.go.tmpl (#88)
Fix a bad merge in the cc template that became apparent when trying to update the Googlesql dependency.
1 parent cee447b commit 95923b1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gen/templates/cc_parser_cc.go.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,10 @@ absl::Status Parser::applyRule(int32_t rule, int32_t ruleLen, stackEntry& lhs,
747747
switch (rule) {
748748
{{ range $index, $rule := .Parser.Rules -}}
749749
{{ $fixWS := and $.Options.FixWhitespace ($.HasTrailingNulls $rule) -}}
750-
{{ if or (ne $rule.Action 0) $fixWS -}}
750+
{{ $cast := needs_cast $ $rule -}}
751+
{{ if or (ne $rule.Action 0) $fixWS $cast -}}
751752
{{ $act := index $.Parser.Actions $rule.Action -}}
752-
{{ if or (ne $act.Code "") $act.Report $fixWS -}}
753+
{{ if or (ne $act.Code "") $act.Report $fixWS $cast -}}
753754
case {{$index}}: // {{$.RuleString $rule}}
754755
{{ if $fixWS -}}
755756
fixTrailingWS(lhs, rhs)

0 commit comments

Comments
 (0)