authorgravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2015-12-09 01:07:27-07:00
committergravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2015-12-09 01:08:18-07:00
log6a48c007a62bca5ba712e92b1f1e32031e43717c
tree4774f54a2c41c285221bc2aac4a84264a1cf8adf
parentdfda85e870df1b0620c418940db3b946fdd3d620

fix typo


4 files changed, 6 insertions(+), 6 deletions(-)

README.md+1-1
...@@ -146,7 +146,7 @@ FnDef : FnProto Block...@@ -146,7 +146,7 @@ FnDef : FnProto Block
146146
147ParamDeclList : token(LParen) list(ParamDecl, token(Comma)) token(RParen)147ParamDeclList : token(LParen) list(ParamDecl, token(Comma)) token(RParen)
148148
149ParamDecl : token(Symbol) token(Colon) Type | token(Ellipse)149ParamDecl : token(Symbol) token(Colon) Type | token(Ellipsis)
150150
151Type : token(Symbol) | token(Unreachable) | token(Void) | PointerType | ArrayType151Type : token(Symbol) | token(Unreachable) | token(Void) | PointerType | ArrayType
152152
src/parser.cpp+2-2
...@@ -517,7 +517,7 @@ static AstNode *ast_parse_type(ParseContext *pc, int token_index, int *new_token...@@ -517,7 +517,7 @@ static AstNode *ast_parse_type(ParseContext *pc, int token_index, int *new_token
517}517}
518518
519/*519/*
520ParamDecl : token(Symbol) token(Colon) Type | token(Ellipse)520ParamDecl : token(Symbol) token(Colon) Type | token(Ellipsis)
521*/521*/
522static AstNode *ast_parse_param_decl(ParseContext *pc, int token_index, int *new_token_index) {522static AstNode *ast_parse_param_decl(ParseContext *pc, int token_index, int *new_token_index) {
523 Token *param_name = &pc->tokens->at(token_index);523 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...@@ -536,7 +536,7 @@ static AstNode *ast_parse_param_decl(ParseContext *pc, int token_index, int *new
536536
537 *new_token_index = token_index;537 *new_token_index = token_index;
538 return node;538 return node;
539 } else if (param_name->id == TokenIdEllipse) {539 } else if (param_name->id == TokenIdEllipsis) {
540 *new_token_index = token_index;540 *new_token_index = token_index;
541 return nullptr;541 return nullptr;
542 } else {542 } else {
src/tokenizer.cpp+2-2
...@@ -337,7 +337,7 @@ void tokenize(Buf *buf, Tokenization *out) {...@@ -337,7 +337,7 @@ void tokenize(Buf *buf, Tokenization *out) {
337 switch (c) {337 switch (c) {
338 case '.':338 case '.':
339 t.state = TokenizeStateDotDot;339 t.state = TokenizeStateDotDot;
340 t.cur_tok->id = TokenIdEllipse;340 t.cur_tok->id = TokenIdEllipsis;
341 break;341 break;
342 default:342 default:
343 t.pos -= 1;343 t.pos -= 1;
...@@ -672,7 +672,7 @@ static const char * token_name(Token *token) {...@@ -672,7 +672,7 @@ static const char * token_name(Token *token) {
672 case TokenIdSlash: return "Slash";672 case TokenIdSlash: return "Slash";
673 case TokenIdPercent: return "Percent";673 case TokenIdPercent: return "Percent";
674 case TokenIdDot: return "Dot";674 case TokenIdDot: return "Dot";
675 case TokenIdEllipse: return "Ellipse";675 case TokenIdEllipsis: return "Ellipsis";
676 }676 }
677 return "(invalid token)";677 return "(invalid token)";
678}678}
src/tokenizer.hpp+1-1
...@@ -65,7 +65,7 @@ enum TokenId {...@@ -65,7 +65,7 @@ enum TokenId {
65 TokenIdSlash,65 TokenIdSlash,
66 TokenIdPercent,66 TokenIdPercent,
67 TokenIdDot,67 TokenIdDot,
68 TokenIdEllipse,68 TokenIdEllipsis,
69};69};
7070
71struct Token {71struct Token {