Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bamless committed Jun 14, 2024
1 parent 32f4cc7 commit 270933f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/jstar/parse/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ JSTAR_API JStarExpr* jsrSpreadExpr(int line, JStarExpr* expr);
JSTAR_API JStarExpr* jsrExprList(int line, ext_vector(JStarExpr*) exprs);
JSTAR_API JStarExpr* jsrBoolLiteral(int line, bool boolean);
JSTAR_API JStarExpr* jsrTupleLiteral(int line, JStarExpr* exprs);
JSTAR_API JStarExpr* jsrArrLiteral(int line, JStarExpr* exprs);
JSTAR_API JStarExpr* jsrListLiteral(int line, JStarExpr* exprs);
JSTAR_API JStarExpr* jsrYieldExpr(int line, JStarExpr* expr);
JSTAR_API JStarExpr* jsrNumLiteral(int line, double num);
JSTAR_API JStarExpr* jsrNullLiteral(int line);
Expand Down
2 changes: 1 addition & 1 deletion src/parse/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ JStarExpr* jsrVarLiteral(int line, const char* var, size_t len) {
return e;
}

JStarExpr* jsrArrLiteral(int line, JStarExpr* exprs) {
JStarExpr* jsrListLiteral(int line, JStarExpr* exprs) {
JStarExpr* a = newExpr(line, JSR_LIST);
a->as.listLiteral.exprs = exprs;
return a;
Expand Down
2 changes: 1 addition & 1 deletion src/parse/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ static JStarExpr* parseSuperLiteral(Parser* p) {
JStarExpr* parseListLiteral(Parser* p) {
int line = p->peek.line;
JStarExpr* exprs = expressionLst(p, TOK_LSQUARE, TOK_RSQUARE);
return jsrArrLiteral(line, exprs);
return jsrListLiteral(line, exprs);
}

static JStarExpr* literal(Parser* p) {
Expand Down

0 comments on commit 270933f

Please sign in to comment.