summaryrefslogtreecommitdiffhomepage
path: root/lexer.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-11-03 23:33:30 +0100
committerJo-Philipp Wich <jo@mein.io>2020-11-05 21:53:23 +0100
commitfeb815bc1a058b91eed9dea3c5cad8ea52d51806 (patch)
treea2fa20ccf392b82e7704545229f614f4026799cd /lexer.c
parent940a89bd5cc1a04dbff4379b02d559982b4febd4 (diff)
syntax: implement ES6-like arrow function syntax
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lexer.c b/lexer.c
index b59d031..3555927 100644
--- a/lexer.c
+++ b/lexer.c
@@ -93,6 +93,7 @@ static const struct token tokens[] = {
{ T_REXP, "}}", 2 },
{ T_LSTM, "{%", 2 },
{ T_RSTM, "%}", 2 },
+ { T_ARROW, "=>", 2 },
{ T_ADD, "+", 1 },
{ T_ASSIGN, "=", 1 },
{ T_BAND, "&", 1 },