Browse Source

Define 'auto' keyword.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
cbe4f29909
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      engine/lexer.c
  2. +1
    -0
      include/ph7int.h

+ 1
- 0
engine/lexer.c View File

@ -542,6 +542,7 @@ static sxu32 KeywordCode(const char *z, int n) {
{"public", PH7_KEYWORD_PUBLIC},
{"static", PH7_KEYWORD_STATIC},
/* Data types */
{"auto", PH7_KEYWORD_AUTO},
{"bool", PH7_KEYWORD_BOOL},
{"callback", PH7_KEYWORD_CALLBACK},
{"char", PH7_KEYWORD_CHAR},


+ 1
- 0
include/ph7int.h View File

@ -1601,6 +1601,7 @@ enum ph7_expr_id {
#define PH7_KEYWORD_RETURN 54 /* return */
#define PH7_KEYWORD_BREAK 55 /* break */
#define PH7_KEYWORD_GOTO 56 /* goto */
#define PH7_KEYWORD_AUTO 0x000800 /* auto: MUST BE A POWER OF TWO */
#define PH7_KEYWORD_VOID 0x001000 /* void: MUST BE A POWER OF TWO */
#define PH7_KEYWORD_CHAR 0x002000 /* char: MUST BE A POWER OF TWO */
#define PH7_KEYWORD_BOOL 0x004000 /* bool: MUST BE A POWER OF TWO */


Loading…
Cancel
Save