Skip to content

Commit

Permalink
Compiler: Reserve the "await" keyword for future use.
Browse files Browse the repository at this point in the history
  • Loading branch information
grubba committed Nov 4, 2018
1 parent 2194f96 commit f7c48a1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,14 @@ static int low_yylex(struct lex *lex, YYSTYPE *yylval)
case TWO_CHAR('a','r'):
if(ISWORD("array")) return TOK_ARRAY_ID;
break;
case TWO_CHAR('a','w'):
if (ISWORD("await")) {
if (Pike_compiler->compiler_pass == COMPILER_PASS_FIRST) {
yywarning("await will soon be a reserved keyword.");
}
break;
}
break;
case TWO_CHAR('a','u'):
if(ISWORD("auto")) return TOK_AUTO_ID;
break;
Expand Down

0 comments on commit f7c48a1

Please sign in to comment.