Treat 'import' as a special keyword.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
b5fe36c14b
commit
9100bf0696
|
@ -610,6 +610,7 @@ static sxu32 KeywordCode(const char *z, int n) {
|
|||
{"eval", PH7_KEYWORD_EVAL},
|
||||
{"do", PH7_KEYWORD_DO},
|
||||
{"exit", PH7_KEYWORD_EXIT},
|
||||
{"import", PH7_KEYWORD_IMPORT},
|
||||
{"implements", PH7_KEYWORD_IMPLEMENTS},
|
||||
{"include", PH7_KEYWORD_INCLUDE},
|
||||
{"empty", PH7_KEYWORD_EMPTY},
|
||||
|
|
|
@ -327,7 +327,7 @@ PH7_PRIVATE void PH7_DelimitNestedTokens(SyToken *pIn, SyToken *pEnd, sxu32 nTok
|
|||
* or method names. Using them as variable names is generally OK, but could lead to confusion.
|
||||
*/
|
||||
PH7_PRIVATE int PH7_IsLangConstruct(sxu32 nKeyID, sxu8 bCheckFunc) {
|
||||
if(nKeyID == PH7_KEYWORD_INCLUDE || nKeyID == PH7_KEYWORD_REQUIRE) {
|
||||
if(nKeyID == PH7_KEYWORD_IMPORT || nKeyID == PH7_KEYWORD_INCLUDE || nKeyID == PH7_KEYWORD_REQUIRE) {
|
||||
return TRUE;
|
||||
}
|
||||
if(bCheckFunc) {
|
||||
|
|
|
@ -1455,6 +1455,7 @@ enum ph7_expr_id {
|
|||
#define PH7_KEYWORD_SWITCH 3 /* switch */
|
||||
#define PH7_KEYWORD_INTERFACE 5 /* interface */
|
||||
/* The number '8' is reserved for PH7_TK_ID */
|
||||
#define PH7_KEYWORD_IMPORT 9 /* import */
|
||||
#define PH7_KEYWORD_REQUIRE 10 /* require */
|
||||
#define PH7_KEYWORD_ELIF 0x4000000 /* elseif: MUST BE A POWER OF TWO */
|
||||
#define PH7_KEYWORD_ELSE 0x8000000 /* else: MUST BE A POWER OF TWO */
|
||||
|
|
Loading…
Reference in New Issue