(t *testing.T)
| 245 | } |
| 246 | |
| 247 | func TestFunctionCallVar(t *testing.T) { |
| 248 | src := `<? $foo(yield $a);` |
| 249 | |
| 250 | expected := &node.Root{ |
| 251 | Position: &position.Position{ |
| 252 | StartLine: 1, |
| 253 | EndLine: 1, |
| 254 | StartPos: 3, |
| 255 | EndPos: 18, |
| 256 | }, |
| 257 | Stmts: []node.Node{ |
| 258 | &stmt.Expression{ |
| 259 | Position: &position.Position{ |
| 260 | StartLine: 1, |
| 261 | EndLine: 1, |
| 262 | StartPos: 3, |
| 263 | EndPos: 18, |
| 264 | }, |
| 265 | Expr: &expr.FunctionCall{ |
| 266 | Position: &position.Position{ |
| 267 | StartLine: 1, |
| 268 | EndLine: 1, |
| 269 | StartPos: 3, |
| 270 | EndPos: 17, |
| 271 | }, |
| 272 | Function: &expr.Variable{ |
| 273 | Position: &position.Position{ |
| 274 | StartLine: 1, |
| 275 | EndLine: 1, |
| 276 | StartPos: 3, |
| 277 | EndPos: 7, |
| 278 | }, |
| 279 | VarName: &node.Identifier{ |
| 280 | Position: &position.Position{ |
| 281 | StartLine: 1, |
| 282 | EndLine: 1, |
| 283 | StartPos: 3, |
| 284 | EndPos: 7, |
| 285 | }, |
| 286 | Value: "foo", |
| 287 | }, |
| 288 | }, |
| 289 | ArgumentList: &node.ArgumentList{ |
| 290 | Position: &position.Position{ |
| 291 | StartLine: 1, |
| 292 | EndLine: 1, |
| 293 | StartPos: 7, |
| 294 | EndPos: 17, |
| 295 | }, |
| 296 | Arguments: []node.Node{ |
| 297 | &node.Argument{ |
| 298 | Position: &position.Position{ |
| 299 | StartLine: 1, |
| 300 | EndLine: 1, |
| 301 | StartPos: 8, |
| 302 | EndPos: 16, |
| 303 | }, |
| 304 | Variadic: false, |
nothing calls this directly
no test coverage detected
searching dependent graphs…