summaryrefslogtreecommitdiff
path: root/src/parser/parser_expr.c
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-18 15:57:40 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-18 15:57:40 +0000
commit43c4f78eb3d2af7778bab6e51d77588bec62930d (patch)
treef8614e429ef913467420af7d08d104030ec6d434 /src/parser/parser_expr.c
parenta7eceb21faf04762379f2ce4d23d21bbc8c11929 (diff)
Update docs + add '..<' + add typed embed.
Diffstat (limited to 'src/parser/parser_expr.c')
-rw-r--r--src/parser/parser_expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser/parser_expr.c b/src/parser/parser_expr.c
index 99ce7d1..b9f022a 100644
--- a/src/parser/parser_expr.c
+++ b/src/parser/parser_expr.c
@@ -3075,10 +3075,10 @@ ASTNode *parse_expr_prec(ParserContext *ctx, Lexer *l, Precedence min_prec)
}
// Case: [..] or [..end]
- if (lexer_peek(l).type == TOK_DOTDOT)
+ if (lexer_peek(l).type == TOK_DOTDOT || lexer_peek(l).type == TOK_DOTDOT_LT)
{
is_slice = 1;
- lexer_next(l); // consume ..
+ lexer_next(l); // consume .. or ..<
if (lexer_peek(l).type != TOK_RBRACKET)
{
end = parse_expression(ctx, l);
@@ -3088,7 +3088,7 @@ ASTNode *parse_expr_prec(ParserContext *ctx, Lexer *l, Precedence min_prec)
{
// Case: [start] or [start..] or [start..end]
start = parse_expression(ctx, l);
- if (lexer_peek(l).type == TOK_DOTDOT)
+ if (lexer_peek(l).type == TOK_DOTDOT || lexer_peek(l).type == TOK_DOTDOT_LT)
{
is_slice = 1;
lexer_next(l); // consume ..