Skip to content

Commit

Permalink
change type
Browse files Browse the repository at this point in the history
  • Loading branch information
FineArchs committed Nov 19, 2023
1 parent 3eba883 commit 46dd71e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etc/aiscript.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ type Fn = NodeBase & {
type: 'fn';
args: {
name: string;
optional?: boolean;
optional: boolean;
default?: Expression;
argType?: TypeSource;
}[];
Expand Down
2 changes: 1 addition & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export type Fn = NodeBase & {
type: 'fn'; // 関数
args: {
name: string; // 引数名
optional?: boolean;
optional: boolean;
default?: Expression; // 引数の初期値
argType?: TypeSource; // 引数の型
}[];
Expand Down
2 changes: 1 addition & 1 deletion src/parser/syntaxes/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function parseParams(s: ITokenStream): { name: string, argType?: Ast.Node
const name = s.token.value!;
s.next();

let optional;
let optional = false;
if ((s.kind as TokenKind) === TokenKind.Question) {
s.next();
optional = true;
Expand Down

0 comments on commit 46dd71e

Please sign in to comment.