EnableHiddenAccumulatorName uses an accumulator variable name that is not a normally accessible identifier in source for comprehension macros. Compatibility notes: with this option enabled, a parsed AST would be semantically the same as if disabled, but would have different internal identifiers in a
(enabled bool)
| 144 | // have different internal identifiers in any of the built-in comprehension sub-expressions. When |
| 145 | // disabled, it is possible but almost certainly a logic error to access the accumulator variable. |
| 146 | func EnableHiddenAccumulatorName(enabled bool) Option { |
| 147 | return func(opts *options) error { |
| 148 | opts.enableHiddenAccumulatorName = enabled |
| 149 | return nil |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | // EnableVariadicOperatorASTs enables a compact representation of chained like-kind commutative |
| 154 | // operators. e.g. `a || b || c || d` -> `call(op='||', args=[a, b, c, d])` |
no outgoing calls
no test coverage detected