1 
2 /*
3 	+------------------------------------------------------------------------+
4 	| Phalcon Framework                                                      |
5 	+------------------------------------------------------------------------+
6 	| Copyright (c) 2011-2016 Phalcon Team (http://www.phalconphp.com)       |
7 	+------------------------------------------------------------------------+
8 	| This source file is subject to the New BSD License that is bundled     |
9 	| with this package in the file docs/LICENSE.txt.                        |
10 	|                                                                        |
11 	| If you did not receive a copy of the license and are unable to         |
12 	| obtain it through the world-wide-web, please send an email             |
13 	| to license@phalconphp.com so we can send you a copy immediately.       |
14 	+------------------------------------------------------------------------+
15 	| Authors: Andres Gutierrez <andres@phalconphp.com>                      |
16 	|          Eduar Carvajal <eduar@phalconphp.com>                         |
17 	+------------------------------------------------------------------------+
18 */
19 
20 #ifndef PHALCON_ANNOTATIONS_ANNOT_H
21 #define PHALCON_ANNOTATIONS_ANNOT_H
22 
23 #include <Zend/zend.h>
24 #include "scanner.h"
25 
26 typedef struct _phannot_parser_token {
27 	char *token;
28 	int opcode;
29 	int token_len;
30 	int free_flag;
31 } phannot_parser_token;
32 
33 typedef struct _phannot_parser_status {
34 #if PHP_VERSION_ID < 70000
35 	zval *ret;
36 #else
37 	zval ret;
38 #endif
39 	phannot_scanner_state *scanner_state;
40 	phannot_scanner_token *token;
41 	char *syntax_error;
42 	int status;
43 } phannot_parser_status;
44 
45 #define PHANNOT_PARSING_OK 1
46 #define PHANNOT_PARSING_FAILED 0
47 
48 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
49 int phannot_internal_parse_annotations(zval **result, const char *comment, int comment_len, const char *file_path, int line, char **error_msg TSRMLS_DC);
50 
51 #endif /* PHALCON_ANNOTATIONS_ANNOT_H */
52