Commit ebc91c3
committed
ParseXS: refactor: alter Node:OUTPUT_line RETVAL
This is #7 of a small series of commits to refactor OUTPUT keyword
handling.
For OUTPUT_line, move, from the parse() method to the as_code() method,
the bit which checks for RETVAL and causes its "push return value on
stack" C code to be emitted later. Also, add a long comment explaining
why this delay is required.
The existing code in parse() worked purely by chance: it was just
returning (without a value) if the parameter name was RETVAL. This was a
hangover from moving the existing code from OUTPUT_handler() into a Node
parse() method. By returning undef, it was signalling to the caller that
the parse of the line failed, and so the subsequent call to as_code()
was skipped. Instead, indicate that the parse was successful, and have
as_code() skip RETVAL.1 parent f281964 commit ebc91c3
1 file changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3122 | 3122 | | |
3123 | 3123 | | |
3124 | 3124 | | |
3125 | | - | |
3126 | | - | |
3127 | | - | |
3128 | | - | |
3129 | | - | |
3130 | | - | |
3131 | 3125 | | |
3132 | 3126 | | |
3133 | 3127 | | |
| |||
3136 | 3130 | | |
3137 | 3131 | | |
3138 | 3132 | | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
3139 | 3165 | | |
3140 | 3166 | | |
| 3167 | + | |
3141 | 3168 | | |
3142 | 3169 | | |
3143 | 3170 | | |
| |||
0 commit comments