diff options
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -71,6 +71,8 @@ static const struct token tokens[] = { { TK_EQS, { .pat = "===" }, 3, NULL }, { TK_NES, { .pat = "!==" }, 3, NULL }, { TK_ELLIP, { .pat = "..." }, 3, NULL }, + { TK_QLBRACK, { .pat = "?.[" }, 3, NULL }, + { TK_QLPAREN, { .pat = "?.(" }, 3, NULL }, { TK_AND, { .pat = "&&" }, 2, NULL }, { TK_ASADD, { .pat = "+=" }, 2, NULL }, { TK_ASBAND, { .pat = "&=" }, 2, NULL }, @@ -96,6 +98,7 @@ static const struct token tokens[] = { { TK_LSTM, { .pat = "{%" }, 2, NULL }, { TK_RSTM, { .pat = "%}" }, 2, NULL }, { TK_ARROW, { .pat = "=>" }, 2, NULL }, + { TK_QDOT, { .pat = "?." }, 2, NULL }, { TK_ADD, { .pat = "+" }, 1, NULL }, { TK_ASSIGN, { .pat = "=" }, 1, NULL }, { TK_BAND, { .pat = "&" }, 1, NULL }, |