Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/code/parser/expr/trailingCommas.test @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 5fb285c0d0e3 |
children |
rev | line source |
---|---|
Chris@13 | 1 PHP 7.3 trailing comma additions |
Chris@13 | 2 ----- |
Chris@13 | 3 <?php |
Chris@13 | 4 |
Chris@13 | 5 foo($a, $b, ); |
Chris@13 | 6 $foo->bar($a, $b, ); |
Chris@13 | 7 Foo::bar($a, $b, ); |
Chris@13 | 8 new Foo($a, $b, ); |
Chris@13 | 9 unset($a, $b, ); |
Chris@13 | 10 isset($a, $b, ); |
Chris@13 | 11 ----- |
Chris@13 | 12 !!php7 |
Chris@13 | 13 array( |
Chris@13 | 14 0: Stmt_Expression( |
Chris@13 | 15 expr: Expr_FuncCall( |
Chris@13 | 16 name: Name( |
Chris@13 | 17 parts: array( |
Chris@13 | 18 0: foo |
Chris@13 | 19 ) |
Chris@13 | 20 ) |
Chris@13 | 21 args: array( |
Chris@13 | 22 0: Arg( |
Chris@13 | 23 value: Expr_Variable( |
Chris@13 | 24 name: a |
Chris@13 | 25 ) |
Chris@13 | 26 byRef: false |
Chris@13 | 27 unpack: false |
Chris@13 | 28 ) |
Chris@13 | 29 1: Arg( |
Chris@13 | 30 value: Expr_Variable( |
Chris@13 | 31 name: b |
Chris@13 | 32 ) |
Chris@13 | 33 byRef: false |
Chris@13 | 34 unpack: false |
Chris@13 | 35 ) |
Chris@13 | 36 ) |
Chris@13 | 37 ) |
Chris@13 | 38 ) |
Chris@13 | 39 1: Stmt_Expression( |
Chris@13 | 40 expr: Expr_MethodCall( |
Chris@13 | 41 var: Expr_Variable( |
Chris@13 | 42 name: foo |
Chris@13 | 43 ) |
Chris@13 | 44 name: Identifier( |
Chris@13 | 45 name: bar |
Chris@13 | 46 ) |
Chris@13 | 47 args: array( |
Chris@13 | 48 0: Arg( |
Chris@13 | 49 value: Expr_Variable( |
Chris@13 | 50 name: a |
Chris@13 | 51 ) |
Chris@13 | 52 byRef: false |
Chris@13 | 53 unpack: false |
Chris@13 | 54 ) |
Chris@13 | 55 1: Arg( |
Chris@13 | 56 value: Expr_Variable( |
Chris@13 | 57 name: b |
Chris@13 | 58 ) |
Chris@13 | 59 byRef: false |
Chris@13 | 60 unpack: false |
Chris@13 | 61 ) |
Chris@13 | 62 ) |
Chris@13 | 63 ) |
Chris@13 | 64 ) |
Chris@13 | 65 2: Stmt_Expression( |
Chris@13 | 66 expr: Expr_StaticCall( |
Chris@13 | 67 class: Name( |
Chris@13 | 68 parts: array( |
Chris@13 | 69 0: Foo |
Chris@13 | 70 ) |
Chris@13 | 71 ) |
Chris@13 | 72 name: Identifier( |
Chris@13 | 73 name: bar |
Chris@13 | 74 ) |
Chris@13 | 75 args: array( |
Chris@13 | 76 0: Arg( |
Chris@13 | 77 value: Expr_Variable( |
Chris@13 | 78 name: a |
Chris@13 | 79 ) |
Chris@13 | 80 byRef: false |
Chris@13 | 81 unpack: false |
Chris@13 | 82 ) |
Chris@13 | 83 1: Arg( |
Chris@13 | 84 value: Expr_Variable( |
Chris@13 | 85 name: b |
Chris@13 | 86 ) |
Chris@13 | 87 byRef: false |
Chris@13 | 88 unpack: false |
Chris@13 | 89 ) |
Chris@13 | 90 ) |
Chris@13 | 91 ) |
Chris@13 | 92 ) |
Chris@13 | 93 3: Stmt_Expression( |
Chris@13 | 94 expr: Expr_New( |
Chris@13 | 95 class: Name( |
Chris@13 | 96 parts: array( |
Chris@13 | 97 0: Foo |
Chris@13 | 98 ) |
Chris@13 | 99 ) |
Chris@13 | 100 args: array( |
Chris@13 | 101 0: Arg( |
Chris@13 | 102 value: Expr_Variable( |
Chris@13 | 103 name: a |
Chris@13 | 104 ) |
Chris@13 | 105 byRef: false |
Chris@13 | 106 unpack: false |
Chris@13 | 107 ) |
Chris@13 | 108 1: Arg( |
Chris@13 | 109 value: Expr_Variable( |
Chris@13 | 110 name: b |
Chris@13 | 111 ) |
Chris@13 | 112 byRef: false |
Chris@13 | 113 unpack: false |
Chris@13 | 114 ) |
Chris@13 | 115 ) |
Chris@13 | 116 ) |
Chris@13 | 117 ) |
Chris@13 | 118 4: Stmt_Unset( |
Chris@13 | 119 vars: array( |
Chris@13 | 120 0: Expr_Variable( |
Chris@13 | 121 name: a |
Chris@13 | 122 ) |
Chris@13 | 123 1: Expr_Variable( |
Chris@13 | 124 name: b |
Chris@13 | 125 ) |
Chris@13 | 126 ) |
Chris@13 | 127 ) |
Chris@13 | 128 5: Stmt_Expression( |
Chris@13 | 129 expr: Expr_Isset( |
Chris@13 | 130 vars: array( |
Chris@13 | 131 0: Expr_Variable( |
Chris@13 | 132 name: a |
Chris@13 | 133 ) |
Chris@13 | 134 1: Expr_Variable( |
Chris@13 | 135 name: b |
Chris@13 | 136 ) |
Chris@13 | 137 ) |
Chris@13 | 138 ) |
Chris@13 | 139 ) |
Chris@13 | 140 ) |