Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Zend/zend_language_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,6 @@ typedef struct _zend_lex_state {
zend_arena *ast_arena;
} zend_lex_state;

typedef struct _zend_heredoc_label {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to make these private, as they can be accessed via the public struct via heredoc_label_stack. Similar issue for zend_nest_location.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will revert.

char *label;
int length;
int indentation;
bool indentation_uses_spaces;
} zend_heredoc_label;

/* Track locations of unclosed {, [, (, etc. for better syntax error reporting */
typedef struct _zend_nest_location {
char text;
uint32_t lineno;
} zend_nest_location;

BEGIN_EXTERN_C()
ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state);
ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state);
Expand Down
13 changes: 13 additions & 0 deletions Zend/zend_language_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
#include "zend_exceptions.h"
#include "zend_virtual_cwd.h"

typedef struct _zend_heredoc_label {
char *label;
int length;
int indentation;
bool indentation_uses_spaces;
} zend_heredoc_label;

/* Track locations of unclosed {, [, (, etc. for better syntax error reporting */
typedef struct _zend_nest_location {
char text;
uint32_t lineno;
} zend_nest_location;

#define YYCTYPE unsigned char
#define YYFILL(n) { if ((YYCURSOR + n) >= (YYLIMIT + ZEND_MMAP_AHEAD)) { return 0; } }
#define YYCURSOR SCNG(yy_cursor)
Expand Down