Skip to content

Commit

Permalink
Update common.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
FineArchs authored Apr 1, 2024
1 parent a36286e commit 1391781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parser/syntaxes/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export function parseParams(s: ITokenStream): { name: string, argType?: Ast.Node
s.next();

let optional = false;
if ((s.kind as TokenKind) === TokenKind.Question) {
if ((s.getKind() as TokenKind) === TokenKind.Question) {
s.next();
optional = true;
}
let defaultExpr;
if ((s.kind as TokenKind) === TokenKind.Eq) {
if ((s.getKind() as TokenKind) === TokenKind.Eq) {
s.next();
defaultExpr = parseExpr(s, false);
}
Expand Down

0 comments on commit 1391781

Please sign in to comment.