Skip to content

Commit

Permalink
enhance: add callstack (#811)
Browse files Browse the repository at this point in the history
* add callStack

* add callstack to error message

* changelog

* add test for callstack

* fix api report

* 関数値に関数名を追加

* コールスタックの表示に関数値の関数名を使用

* 関数名をズラして表示する

* fix lint warnings and api report

* エラー発生位置情報をコールスタックへ移動

* 名前空間内の関数名に名前空間を追加

* improve test

* update api report
  • Loading branch information
uzmoi authored Oct 29, 2024
1 parent e02c847 commit 57a9e01
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 115 deletions.
6 changes: 4 additions & 2 deletions etc/aiscript.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ export class Scope {
exists(name: string): boolean;
get(name: string): Value;
getAll(): Map<string, Variable>;
getNsPrefix(): string;
// (undocumented)
name: string;
// (undocumented)
Expand Down Expand Up @@ -857,15 +858,16 @@ type VStr = {
// @public (undocumented)
type VUserFn = VFnBase & {
native?: undefined;
name?: string;
args: VFnArg[];
statements: Node_2[];
scope: Scope;
};

// Warnings were encountered during analysis:
//
// src/interpreter/index.ts:38:4 - (ae-forgotten-export) The symbol "LogObject" needs to be exported by the entry point index.d.ts
// src/interpreter/value.ts:46:2 - (ae-forgotten-export) The symbol "Type" needs to be exported by the entry point index.d.ts
// src/interpreter/index.ts:43:4 - (ae-forgotten-export) The symbol "LogObject" needs to be exported by the entry point index.d.ts
// src/interpreter/value.ts:47:2 - (ae-forgotten-export) The symbol "Type" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
Loading

0 comments on commit 57a9e01

Please sign in to comment.