diff --git a/README.md b/README.md index da4a14f35e8a50d17a71929d0c7510a87036da48..f5baf9e07ac6b616a04e9e2ab6a4297a8a8ccd9b 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ FnDef : FnProto Block ParamDeclList : token(LParen) list(ParamDecl, token(Comma)) token(RParen) -ParamDecl : token(Symbol) token(Colon) Type | token(Ellipse) +ParamDecl : token(Symbol) token(Colon) Type | token(Ellipsis) Type : token(Symbol) | token(Unreachable) | token(Void) | PointerType | ArrayType diff --git a/src/parser.cpp b/src/parser.cpp index 0ef3e6664bee0d52978d3f0fa8606edd6e59b2f9..6c8a54ad9e471503813fed27afb685c389a742ec 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -517,7 +517,7 @@ static AstNode *ast_parse_type(ParseContext *pc, int token_index, int *new_token } /* -ParamDecl : token(Symbol) token(Colon) Type | token(Ellipse) +ParamDecl : token(Symbol) token(Colon) Type | token(Ellipsis) */ static AstNode *ast_parse_param_decl(ParseContext *pc, int token_index, int *new_token_index) { Token *param_name = &pc->tokens->at(token_index); @@ -536,7 +536,7 @@ static AstNode *ast_parse_param_decl(ParseContext *pc, int token_index, int *new *new_token_index = token_index; return node; - } else if (param_name->id == TokenIdEllipse) { + } else if (param_name->id == TokenIdEllipsis) { *new_token_index = token_index; return nullptr; } else { diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index e1249bbed17192ccd35ac36bef0442a542f9d25c..2419bfc3ad9f71582a799565971afeb6df70a4b2 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -337,7 +337,7 @@ void tokenize(Buf *buf, Tokenization *out) { switch (c) { case '.': t.state = TokenizeStateDotDot; - t.cur_tok->id = TokenIdEllipse; + t.cur_tok->id = TokenIdEllipsis; break; default: t.pos -= 1; @@ -672,7 +672,7 @@ static const char * token_name(Token *token) { case TokenIdSlash: return "Slash"; case TokenIdPercent: return "Percent"; case TokenIdDot: return "Dot"; - case TokenIdEllipse: return "Ellipse"; + case TokenIdEllipsis: return "Ellipsis"; } return "(invalid token)"; } diff --git a/src/tokenizer.hpp b/src/tokenizer.hpp index 6f15b5aed5a00e94c1582ea2e94c7509af7f4c47..56031d71842849cb69ed1833b0358cfca04768e4 100644 --- a/src/tokenizer.hpp +++ b/src/tokenizer.hpp @@ -65,7 +65,7 @@ enum TokenId { TokenIdSlash, TokenIdPercent, TokenIdDot, - TokenIdEllipse, + TokenIdEllipsis, }; struct Token {