|
| 1 | + |
1 | 2 | /* |
2 | | - +--------------------------------------------------------------------------+ |
3 | | - | Zephir Parser | |
4 | | - +--------------------------------------------------------------------------+ |
5 | | - | Copyright (c) 2013-2017 Zephir Team and contributors | |
6 | | - +--------------------------------------------------------------------------+ |
7 | | - | This source file is subject the MIT license, that is bundled with | |
8 | | - | this package in the file LICENSE, and is available through the | |
9 | | - | world-wide-web at the following url: | |
10 | | - | http://zephir-lang.com/license.html | |
11 | | - | | |
12 | | - | If you did not receive a copy of the MIT license and are unable | |
13 | | - | to obtain it through the world-wide-web, please send a note to | |
14 | | - | license@zephir-lang.com so we can mail you a copy immediately. | |
15 | | - +--------------------------------------------------------------------------+ |
| 3 | + +--------------------------------------------------------------------------+ |
| 4 | + | Zephir Parser | |
| 5 | + | Copyright (c) 2013-present Zephir (https://zephir-lang.com/) | |
| 6 | + | | |
| 7 | + | This source file is subject the MIT license, that is bundled with this | |
| 8 | + | package in the file LICENSE, and is available through the world-wide-web | |
| 9 | + | at the following url: http://zephir-lang.com/license.html | |
| 10 | + +--------------------------------------------------------------------------+ |
16 | 11 | */ |
17 | 12 |
|
18 | 13 | const xx_token_names xx_tokens[] = |
@@ -275,23 +270,32 @@ void xx_parse_program(zval *return_value, char *program, size_t program_length, |
275 | 270 | case XX_T_ASSIGN: |
276 | 271 | xx_(xx_parser, XX_ASSIGN, NULL, parser_status); |
277 | 272 | break; |
278 | | - case XX_T_ADDASSIGN: |
279 | | - xx_(xx_parser, XX_ADDASSIGN, NULL, parser_status); |
| 273 | + case XX_T_ASSIGN_ADD: |
| 274 | + xx_(xx_parser, XX_ASSIGN_ADD, NULL, parser_status); |
| 275 | + break; |
| 276 | + case XX_T_ASSIGN_SUB: |
| 277 | + xx_(xx_parser, XX_ASSIGN_SUB, NULL, parser_status); |
| 278 | + break; |
| 279 | + case XX_T_ASSIGN_DIV: |
| 280 | + xx_(xx_parser, XX_ASSIGN_DIV, NULL, parser_status); |
280 | 281 | break; |
281 | | - case XX_T_SUBASSIGN: |
282 | | - xx_(xx_parser, XX_SUBASSIGN, NULL, parser_status); |
| 282 | + case XX_T_ASSIGN_MUL: |
| 283 | + xx_(xx_parser, XX_ASSIGN_MUL, NULL, parser_status); |
283 | 284 | break; |
284 | | - case XX_T_DIVASSIGN: |
285 | | - xx_(xx_parser, XX_DIVASSIGN, NULL, parser_status); |
| 285 | + case XX_T_ASSIGN_CONCAT: |
| 286 | + xx_(xx_parser, XX_ASSIGN_CONCAT, NULL, parser_status); |
286 | 287 | break; |
287 | | - case XX_T_MULASSIGN: |
288 | | - xx_(xx_parser, XX_MULASSIGN, NULL, parser_status); |
| 288 | + case XX_T_ASSIGN_MOD: |
| 289 | + xx_(xx_parser, XX_T_ASSIGN_MOD, NULL, parser_status); |
289 | 290 | break; |
290 | | - case XX_T_CONCATASSIGN: |
291 | | - xx_(xx_parser, XX_CONCATASSIGN, NULL, parser_status); |
| 291 | + case XX_T_ASSIGN_BITWISE_OR: |
| 292 | + xx_(xx_parser, XX_ASSIGN_BITWISE_OR, NULL, parser_status); |
292 | 293 | break; |
293 | | - case XX_T_MODASSIGN: |
294 | | - xx_(xx_parser, XX_MODASSIGN, NULL, parser_status); |
| 294 | + case XX_T_ASSIGN_BITWISE_XOR: |
| 295 | + xx_(xx_parser, XX_ASSIGN_BITWISE_XOR, NULL, parser_status); |
| 296 | + break; |
| 297 | + case XX_T_ASSIGN_BITWISE_SHIFTLEFT: |
| 298 | + xx_(xx_parser, XX_ASSIGN_BITWISE_SHIFTLEFT, NULL, parser_status); |
295 | 299 | break; |
296 | 300 | case XX_T_EQUALS: |
297 | 301 | xx_(xx_parser, XX_EQUALS, NULL, parser_status); |
@@ -524,7 +528,7 @@ void xx_parse_program(zval *return_value, char *program, size_t program_length, |
524 | 528 | int length = (48 + strlen(file_path)); |
525 | 529 | error = emalloc(sizeof(char) * length); |
526 | 530 | snprintf(error, length, "Scanner: unknown opcode %d on in %s line %d", token.opcode, file_path, state->active_line); |
527 | | - |
| 531 | + |
528 | 532 | array_init(error_msg); |
529 | 533 | #if PHP_VERSION_ID >= 70000 |
530 | 534 | add_assoc_string(error_msg, "type", "error"); |
|
0 commit comments