Skip to content

Commit e7cb704

Browse files
authored
Merge pull request #2 from aiscript-dev/fix-vsce
vsceでパッケージできない問題を回避
2 parents 3b3948a + 69ff795 commit e7cb704

File tree

9 files changed

+1119
-7808
lines changed

9 files changed

+1119
-7808
lines changed

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
aiscript/
2+
features/

features/core/errors/AiSyntaxError.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Token } from "@syuilo/aiscript/parser/token.js";
22
import { SourceLocation } from "../parser/SourceRange.js";
3-
import { Ast } from "@syuilo/aiscript";
3+
import { Ast } from "@syuilo/aiscript/index.js";
44

55
export enum AiSyntaxErrorId {
66
invalidAttribute,
@@ -28,7 +28,7 @@ export class AiSyntaxError extends Error {
2828
constructor(
2929
public messageId: AiSyntaxErrorId,
3030
public token: Token | Ast.Node,
31-
public location: SourceLocation,
31+
public location: SourceLocation
3232
) {
3333
super(AiSyntaxErrorId[messageId]);
3434
}
@@ -38,7 +38,7 @@ export class AiMissingKeywordError extends AiSyntaxError {
3838
constructor(
3939
public keyword: string,
4040
token: Token | Ast.Node,
41-
location: SourceLocation,
41+
location: SourceLocation
4242
) {
4343
super(AiSyntaxErrorId.MissingKeyword, token, location);
4444
}
@@ -48,7 +48,7 @@ export class AiMissingBracketError extends AiSyntaxError {
4848
constructor(
4949
public bracket: string,
5050
token: Token | Ast.Node,
51-
location: SourceLocation,
51+
location: SourceLocation
5252
) {
5353
super(AiSyntaxErrorId.MissingBracket, token, location);
5454
}

features/core/parser/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Ast } from "@syuilo/aiscript";
1+
import { Ast } from "@syuilo/aiscript/index.js";
22
import { Scanner } from "@syuilo/aiscript/parser/scanner.js";
33
import { Token, TokenKind } from "@syuilo/aiscript/parser/token.js";
44
import { ParserError } from "../errors/index.js";

features/core/parser/utils.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
import { Ast } from "@syuilo/aiscript";
1+
import { Ast } from "@syuilo/aiscript/index.js";
22

33
export type NodeParam<N extends Ast.Node> = {
44
[K in Exclude<keyof N, "type" | "loc">]: N[K];
55
};
66

77
export function NODE<
88
T extends Ast.Node["type"],
9-
N extends Ast.Node & { type: T },
10-
>(
11-
type: T,
12-
params: NodeParam<N>,
13-
loc: { column: number; line: number },
14-
): N {
9+
N extends Ast.Node & { type: T }
10+
>(type: T, params: NodeParam<N>, loc: { column: number; line: number }): N {
1511
return {
1612
type: type,
1713
...params,
@@ -22,10 +18,14 @@ export function NODE<
2218
export function CALL_NODE(
2319
name: string,
2420
args: Ast.Expression[],
25-
loc: { column: number; line: number },
21+
loc: { column: number; line: number }
2622
) {
27-
return NODE("call", {
28-
target: NODE("identifier", { name }, loc),
29-
args,
30-
}, loc);
23+
return NODE(
24+
"call",
25+
{
26+
target: NODE("identifier", { name }, loc),
27+
args,
28+
},
29+
loc
30+
);
3131
}

features/core/typing/Scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Ast } from "@syuilo/aiscript";
1+
import { Ast } from "@syuilo/aiscript/index.js";
22
import { AiAlreadyDeclaredVariableError } from "../errors/AiTypeError.js";
33
import { TypeValue } from "./TypeValue.js";
44
import { Variable } from "./Variable.js";

features/core/typing/TypeChecker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Ast } from "@syuilo/aiscript";
1+
import { Ast } from "@syuilo/aiscript/index.js";
22
import { TypeError } from "../index.js";
33
import { Scope } from "./Scope.js";
44
import { TypeValue } from "./TypeValue.js";

0 commit comments

Comments
 (0)