summaryrefslogtreecommitdiffhomepage
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lexer.c b/lexer.c
index 75dc04a..fc2c685 100644
--- a/lexer.c
+++ b/lexer.c
@@ -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 },