commit dea90e20e64668f259be14366391a31151428f3d (tree)
parent ba7b5daa22bb17a022a8c75d2a26dc54161eb9f2
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Wed, 9 Aug 2017 17:52:02 -0400
fix tokenization error pointing to wrong character
closes #401
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -1,6 +1,6 @@

-A programming language which prioritizes optimality, robustness, and
+A programming language designed for robustness, optimality, and
clarity.
[ziglang.org](http://ziglang.org)
diff --git a/src/parser.cpp b/src/parser.cpp
@@ -883,7 +883,7 @@ static AstNode *ast_parse_curly_suffix_expr(ParseContext *pc, size_t *token_inde
SuffixOpExpression = PrimaryExpression option(FnCallExpression | ArrayAccessExpression | FieldAccessExpression | SliceExpression)
FnCallExpression : token(LParen) list(Expression, token(Comma)) token(RParen)
ArrayAccessExpression : token(LBracket) Expression token(RBracket)
-SliceExpression = "[" Expression "..." option(Expression) "]"
+SliceExpression = "[" Expression ".." option(Expression) "]"
FieldAccessExpression : token(Dot) token(Symbol)
StructLiteralField : token(Dot) token(Symbol) token(Eq) Expression
*/
@@ -929,7 +929,7 @@ static AstNode *ast_parse_suffix_op_expr(ParseContext *pc, size_t *token_index,
primary_expr = node;
} else {
- ast_invalid_token_error(pc, first_token);
+ ast_invalid_token_error(pc, ellipsis_or_r_bracket);
}
} else if (first_token->id == TokenIdDot) {
*token_index += 1;