|
| 1 | +=========================================================== |
| 2 | +unary operator |
| 3 | +=========================================================== |
| 4 | + |
| 5 | +a: () = -a<int>(x); |
| 6 | +a: () = a<int>(x); |
| 7 | + |
| 8 | +----------------------------------------------------------- |
| 9 | + |
| 10 | +(translation_unit |
| 11 | + (cpp2_expression_declaration |
| 12 | + (cpp2_non_template_identifier |
| 13 | + (cpp2_ordinary_identifier |
| 14 | + (identifier))) |
| 15 | + (cpp2_expression_definition |
| 16 | + (cpp2_left_side_of_definition |
| 17 | + (cpp2_expression |
| 18 | + (cpp2_type |
| 19 | + (cpp2_function_type |
| 20 | + (cpp2_function_type_without_return_type))))) |
| 21 | + (cpp2_expression |
| 22 | + (cpp2_unary_expression |
| 23 | + (cpp2_unary_prefix_expression |
| 24 | + (cpp2_expression |
| 25 | + (cpp2_function_call |
| 26 | + (cpp2_expression |
| 27 | + (cpp2_any_identifier |
| 28 | + (cpp2_non_template_identifier |
| 29 | + (cpp2_ordinary_identifier |
| 30 | + (identifier))) |
| 31 | + (cpp2_template_call_arguments |
| 32 | + (cpp2_comma_expressions |
| 33 | + (cpp2_expression |
| 34 | + (cpp2_keyword |
| 35 | + (cpp2_primitive_type |
| 36 | + (primitive_type)))))))) |
| 37 | + (cpp2_parentheses_expression |
| 38 | + (cpp2_comma_expressions |
| 39 | + (cpp2_expression |
| 40 | + (cpp2_any_identifier |
| 41 | + (cpp2_non_template_identifier |
| 42 | + (cpp2_ordinary_identifier |
| 43 | + (identifier)))))))))))))) |
| 44 | + (cpp2_expression_declaration |
| 45 | + (cpp2_non_template_identifier |
| 46 | + (cpp2_ordinary_identifier |
| 47 | + (identifier))) |
| 48 | + (cpp2_expression_definition |
| 49 | + (cpp2_left_side_of_definition |
| 50 | + (cpp2_expression |
| 51 | + (cpp2_type |
| 52 | + (cpp2_function_type |
| 53 | + (cpp2_function_type_without_return_type))))) |
| 54 | + (cpp2_expression |
| 55 | + (cpp2_function_call |
| 56 | + (cpp2_expression |
| 57 | + (cpp2_any_identifier |
| 58 | + (cpp2_non_template_identifier |
| 59 | + (cpp2_ordinary_identifier |
| 60 | + (identifier))) |
| 61 | + (cpp2_template_call_arguments |
| 62 | + (cpp2_comma_expressions |
| 63 | + (cpp2_expression |
| 64 | + (cpp2_keyword |
| 65 | + (cpp2_primitive_type |
| 66 | + (primitive_type)))))))) |
| 67 | + (cpp2_parentheses_expression |
| 68 | + (cpp2_comma_expressions |
| 69 | + (cpp2_expression |
| 70 | + (cpp2_any_identifier |
| 71 | + (cpp2_non_template_identifier |
| 72 | + (cpp2_ordinary_identifier |
| 73 | + (identifier)))))))))))) |
| 74 | + |
| 75 | +=========================================================== |
| 76 | +binary operator |
| 77 | +=========================================================== |
| 78 | + |
| 79 | +a: () = a<int>(piece) - a<int>(Piece::pawn); |
| 80 | +a: () = a<int>(piece) - (a<int>(Piece::pawn)); |
| 81 | +a: () = (a<int>(piece)) - a<int>(Piece::pawn); |
| 82 | + |
| 83 | + |
| 84 | +----------------------------------------------------------- |
| 85 | + |
| 86 | +(translation_unit |
| 87 | + (cpp2_expression_declaration |
| 88 | + (cpp2_non_template_identifier |
| 89 | + (cpp2_ordinary_identifier |
| 90 | + (identifier))) |
| 91 | + (cpp2_expression_definition |
| 92 | + (cpp2_left_side_of_definition |
| 93 | + (cpp2_expression |
| 94 | + (cpp2_type |
| 95 | + (cpp2_function_type |
| 96 | + (cpp2_function_type_without_return_type))))) |
| 97 | + (cpp2_expression |
| 98 | + (cpp2_binary_expression |
| 99 | + (cpp2_expression |
| 100 | + (cpp2_function_call |
| 101 | + (cpp2_expression |
| 102 | + (cpp2_any_identifier |
| 103 | + (cpp2_non_template_identifier |
| 104 | + (cpp2_ordinary_identifier |
| 105 | + (identifier))) |
| 106 | + (cpp2_template_call_arguments |
| 107 | + (cpp2_comma_expressions |
| 108 | + (cpp2_expression |
| 109 | + (cpp2_keyword |
| 110 | + (cpp2_primitive_type |
| 111 | + (primitive_type)))))))) |
| 112 | + (cpp2_parentheses_expression |
| 113 | + (cpp2_comma_expressions |
| 114 | + (cpp2_expression |
| 115 | + (cpp2_any_identifier |
| 116 | + (cpp2_non_template_identifier |
| 117 | + (cpp2_ordinary_identifier |
| 118 | + (identifier))))))))) |
| 119 | + (cpp2_expression |
| 120 | + (cpp2_function_call |
| 121 | + (cpp2_expression |
| 122 | + (cpp2_any_identifier |
| 123 | + (cpp2_non_template_identifier |
| 124 | + (cpp2_ordinary_identifier |
| 125 | + (identifier))) |
| 126 | + (cpp2_template_call_arguments |
| 127 | + (cpp2_comma_expressions |
| 128 | + (cpp2_expression |
| 129 | + (cpp2_keyword |
| 130 | + (cpp2_primitive_type |
| 131 | + (primitive_type)))))))) |
| 132 | + (cpp2_parentheses_expression |
| 133 | + (cpp2_comma_expressions |
| 134 | + (cpp2_expression |
| 135 | + (cpp2_any_identifier |
| 136 | + (cpp2_non_template_identifier |
| 137 | + (cpp2_ordinary_identifier |
| 138 | + (identifier))) |
| 139 | + (cpp2_non_template_identifier |
| 140 | + (cpp2_ordinary_identifier |
| 141 | + (identifier))))))))))))) |
| 142 | + (cpp2_expression_declaration |
| 143 | + (cpp2_non_template_identifier |
| 144 | + (cpp2_ordinary_identifier |
| 145 | + (identifier))) |
| 146 | + (cpp2_expression_definition |
| 147 | + (cpp2_left_side_of_definition |
| 148 | + (cpp2_expression |
| 149 | + (cpp2_type |
| 150 | + (cpp2_function_type |
| 151 | + (cpp2_function_type_without_return_type))))) |
| 152 | + (cpp2_expression |
| 153 | + (cpp2_binary_expression |
| 154 | + (cpp2_expression |
| 155 | + (cpp2_function_call |
| 156 | + (cpp2_expression |
| 157 | + (cpp2_any_identifier |
| 158 | + (cpp2_non_template_identifier |
| 159 | + (cpp2_ordinary_identifier |
| 160 | + (identifier))) |
| 161 | + (cpp2_template_call_arguments |
| 162 | + (cpp2_comma_expressions |
| 163 | + (cpp2_expression |
| 164 | + (cpp2_keyword |
| 165 | + (cpp2_primitive_type |
| 166 | + (primitive_type)))))))) |
| 167 | + (cpp2_parentheses_expression |
| 168 | + (cpp2_comma_expressions |
| 169 | + (cpp2_expression |
| 170 | + (cpp2_any_identifier |
| 171 | + (cpp2_non_template_identifier |
| 172 | + (cpp2_ordinary_identifier |
| 173 | + (identifier))))))))) |
| 174 | + (cpp2_expression |
| 175 | + (cpp2_parentheses_expression |
| 176 | + (cpp2_comma_expressions |
| 177 | + (cpp2_expression |
| 178 | + (cpp2_function_call |
| 179 | + (cpp2_expression |
| 180 | + (cpp2_any_identifier |
| 181 | + (cpp2_non_template_identifier |
| 182 | + (cpp2_ordinary_identifier |
| 183 | + (identifier))) |
| 184 | + (cpp2_template_call_arguments |
| 185 | + (cpp2_comma_expressions |
| 186 | + (cpp2_expression |
| 187 | + (cpp2_keyword |
| 188 | + (cpp2_primitive_type |
| 189 | + (primitive_type)))))))) |
| 190 | + (cpp2_parentheses_expression |
| 191 | + (cpp2_comma_expressions |
| 192 | + (cpp2_expression |
| 193 | + (cpp2_any_identifier |
| 194 | + (cpp2_non_template_identifier |
| 195 | + (cpp2_ordinary_identifier |
| 196 | + (identifier))) |
| 197 | + (cpp2_non_template_identifier |
| 198 | + (cpp2_ordinary_identifier |
| 199 | + (identifier)))))))))))))))) |
| 200 | + (cpp2_expression_declaration |
| 201 | + (cpp2_non_template_identifier |
| 202 | + (cpp2_ordinary_identifier |
| 203 | + (identifier))) |
| 204 | + (cpp2_expression_definition |
| 205 | + (cpp2_left_side_of_definition |
| 206 | + (cpp2_expression |
| 207 | + (cpp2_type |
| 208 | + (cpp2_function_type |
| 209 | + (cpp2_function_type_without_return_type))))) |
| 210 | + (cpp2_expression |
| 211 | + (cpp2_binary_expression |
| 212 | + (cpp2_expression |
| 213 | + (cpp2_parentheses_expression |
| 214 | + (cpp2_comma_expressions |
| 215 | + (cpp2_expression |
| 216 | + (cpp2_function_call |
| 217 | + (cpp2_expression |
| 218 | + (cpp2_any_identifier |
| 219 | + (cpp2_non_template_identifier |
| 220 | + (cpp2_ordinary_identifier |
| 221 | + (identifier))) |
| 222 | + (cpp2_template_call_arguments |
| 223 | + (cpp2_comma_expressions |
| 224 | + (cpp2_expression |
| 225 | + (cpp2_keyword |
| 226 | + (cpp2_primitive_type |
| 227 | + (primitive_type)))))))) |
| 228 | + (cpp2_parentheses_expression |
| 229 | + (cpp2_comma_expressions |
| 230 | + (cpp2_expression |
| 231 | + (cpp2_any_identifier |
| 232 | + (cpp2_non_template_identifier |
| 233 | + (cpp2_ordinary_identifier |
| 234 | + (identifier)))))))))))) |
| 235 | + (cpp2_expression |
| 236 | + (cpp2_function_call |
| 237 | + (cpp2_expression |
| 238 | + (cpp2_any_identifier |
| 239 | + (cpp2_non_template_identifier |
| 240 | + (cpp2_ordinary_identifier |
| 241 | + (identifier))) |
| 242 | + (cpp2_template_call_arguments |
| 243 | + (cpp2_comma_expressions |
| 244 | + (cpp2_expression |
| 245 | + (cpp2_keyword |
| 246 | + (cpp2_primitive_type |
| 247 | + (primitive_type)))))))) |
| 248 | + (cpp2_parentheses_expression |
| 249 | + (cpp2_comma_expressions |
| 250 | + (cpp2_expression |
| 251 | + (cpp2_any_identifier |
| 252 | + (cpp2_non_template_identifier |
| 253 | + (cpp2_ordinary_identifier |
| 254 | + (identifier))) |
| 255 | + (cpp2_non_template_identifier |
| 256 | + (cpp2_ordinary_identifier |
| 257 | + (identifier)))))))))))))) |
0 commit comments