From af74ddb119e3c5167a10bf5468af3960c8db42c0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 2 Mar 2019 21:48:30 +0100 Subject: Use 'fn' to define closure to make parsing/reading the language easier It caused issues when you have parentheses to surround math expression, for example: ((func() + 34) * 54) is easier to parse if closure has to begin with 'fn'. Also removed requirement for semicolons. Semicolons can't even be used optionally yet. --- include/tokenizer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/tokenizer.h b/include/tokenizer.h index c76cd52..6f00704 100644 --- a/include/tokenizer.h +++ b/include/tokenizer.h @@ -16,6 +16,7 @@ typedef enum { TOK_CONST, TOK_VAR, TOK_STRING, + TOK_FN, TOK_EQUALS, TOK_OPEN_PAREN, TOK_CLOSING_PAREN, -- cgit v1.2.3