Skip to content

Commit 9ed6355

Browse files
committed
Minor code refactor
1 parent 3dd1b8b commit 9ed6355

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

parser/parser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ static int is_empty(const char *program)
3333
static void parser_add_str(zval *arr, const char *key, const char *val) {
3434
zval tmp;
3535
zend_string *tmp_str;
36+
3637
if (!strcmp(val, "return_value")) {
3738
tmp_str = zend_string_init("_zephir_return_value", strlen("_zephir_return_value"), 0);
3839
} else if (!strcmp(val, "this_ptr")) {
3940
tmp_str = zend_string_init("_zephir_this_ptr", strlen("_zephir_this_ptr"), 0);
4041
} else {
4142
tmp_str = zend_string_init(val, strlen(val), 0);
4243
}
44+
4345
ZVAL_STR(&tmp, tmp_str);
4446
zend_hash_str_add(Z_ARRVAL_P(arr), key, strlen(key), &tmp);
4547
}

parser/scanner.re

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424
#define YYMARKER (s->marker)
2525

2626
int xx_get_token(xx_scanner_state *s, xx_scanner_token *token) {
27-
2827
char *start = YYCURSOR;
2928
int status = XX_SCANNER_RETCODE_IMPOSSIBLE;
3029
int is_constant = 0, j;
3130

3231
while (XX_SCANNER_RETCODE_IMPOSSIBLE == status) {
33-
3432
/*!re2c
3533
re2c:indent:top = 2;
3634
re2c:yyfill:enable = 0;

parser/zephir.lemon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
//
3838
// The token values assigned to these symbols is determined by the order
3939
// in which lemon first sees them.
40+
4041
%left INTERNAL PUBLIC PROTECTED STATIC PRIVATE SCOPED .
4142
%left COMMA .
4243
%right REQUIRE .

0 commit comments

Comments
 (0)