xref: /PHP-7.1/ext/tokenizer/php_tokenizer.h (revision ccd4716e)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2018 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Author: Andrei Zmievski <andrei@php.net>                             |
16    +----------------------------------------------------------------------+
17  */
18 
19 /* $Id$ */
20 
21 #ifndef PHP_TOKENIZER_H
22 #define PHP_TOKENIZER_H
23 
24 extern zend_module_entry tokenizer_module_entry;
25 #define phpext_tokenizer_ptr &tokenizer_module_entry
26 
27 #include "php_version.h"
28 #define PHP_TOKENIZER_VERSION PHP_VERSION
29 
30 #ifdef ZTS
31 #include "TSRM.h"
32 #endif
33 
34 void tokenizer_register_constants(INIT_FUNC_ARGS);
35 char *get_token_type_name(int token_type);
36 
37 
38 PHP_MINIT_FUNCTION(tokenizer);
39 PHP_MINFO_FUNCTION(tokenizer);
40 
41 PHP_FUNCTION(token_get_all);
42 PHP_FUNCTION(token_name);
43 
44 #ifdef ZTS
45 #define TOKENIZER_G(v) TSRMG(tokenizer_globals_id, zend_tokenizer_globals *, v)
46 #else
47 #define TOKENIZER_G(v) (tokenizer_globals.v)
48 #endif
49 
50 #endif	/* PHP_TOKENIZER_H */
51 
52 
53 /*
54  * Local variables:
55  * tab-width: 4
56  * c-basic-offset: 4
57  * indent-tabs-mode: t
58  * End:
59  */
60