Browse Source

VAR & FUNCTION are no longer valid keywords.

pull/50/head
Rafal Kupiec 3 years ago
parent
commit
135e7c9698
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
  1. 3
      engine/lexer.c
  2. 2
      include/ph7int.h

3
engine/lexer.c

@ -635,9 +635,6 @@ static sxu32 KeywordCode(const char *z, int n) {
{"isset", PH7_KEYWORD_ISSET},
{"require", PH7_KEYWORD_REQUIRE},
{"return", PH7_KEYWORD_RETURN},
/* Other keywords */
{"function", PH7_KEYWORD_FUNCTION},
{"var", PH7_KEYWORD_VAR}
};
if(n < 2) {
return PH7_TK_ID;

2
include/ph7int.h

@ -1574,7 +1574,6 @@ enum ph7_expr_id {
#define PH7_KEYWORD_STATIC 16 /* static */
#define PH7_KEYWORD_CASE 17 /* case */
#define PH7_KEYWORD_SELF 18 /* self */
#define PH7_KEYWORD_FUNCTION 19 /* function */
#define PH7_KEYWORD_NAMESPACE 20 /* namespace */
#define PH7_KEYWORD_CLONE 0x80 /* clone: MUST BE A POWER OF TWO */
#define PH7_KEYWORD_NEW 0x100 /* new: MUST BE A POWER OF TWO */
@ -1583,7 +1582,6 @@ enum ph7_expr_id {
#define PH7_KEYWORD_USING 24 /* using */
#define PH7_KEYWORD_WHILE 26 /* while */
#define PH7_KEYWORD_EVAL 27 /* eval */
#define PH7_KEYWORD_VAR 28 /* var */
#define PH7_KEYWORD_VIRTUAL 29 /* virtual */
#define PH7_KEYWORD_TRY 30 /* try */
#define PH7_KEYWORD_DEFAULT 31 /* default */

Loading…
Cancel
Save