aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index 3f55a51..51a85ff 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -623,6 +623,8 @@ static AstNode* parse_primary_expr(Parser* p) {
Token* t = next_token(p);
if (t->kind == TokenKind_literal_int) {
return ast_new_int(t->value.integer);
+ } else if (t->kind == TokenKind_literal_double) {
+ return ast_new_double(t->value.floating);
} else if (t->kind == TokenKind_keyword_true) {
return ast_new_int(1);
} else if (t->kind == TokenKind_keyword_false) {