@@ -3697,6 +3697,11 @@ declare module "assemblyscript/src/parser" {
3697
3697
import { Tokenizer , CommentHandler } from "assemblyscript/src/tokenizer" ;
3698
3698
import { DiagnosticEmitter , DiagnosticMessage } from "assemblyscript/src/diagnostics" ;
3699
3699
import { Node , Source , TypeNode , TypeName , FunctionTypeNode , Expression , ClassExpression , FunctionExpression , Statement , BlockStatement , BreakStatement , ClassDeclaration , ContinueStatement , DecoratorNode , DoStatement , EnumDeclaration , EnumValueDeclaration , ExportImportStatement , ExportMember , ExportStatement , ExpressionStatement , ForOfStatement , FunctionDeclaration , IfStatement , ImportDeclaration , ImportStatement , IndexSignatureNode , NamespaceDeclaration , ParameterNode , ReturnStatement , SwitchCase , SwitchStatement , ThrowStatement , TryStatement , TypeDeclaration , TypeParameterNode , VariableStatement , VariableDeclaration , VoidStatement , WhileStatement } from "assemblyscript/src/ast" ;
3700
+ class Dependee {
3701
+ source : Source ;
3702
+ reportNode : Node ;
3703
+ constructor ( source : Source , reportNode : Node ) ;
3704
+ }
3700
3705
/** Parser interface. */
3701
3706
export class Parser extends DiagnosticEmitter {
3702
3707
/** Source file names to be requested next. */
@@ -3709,16 +3714,16 @@ declare module "assemblyscript/src/parser" {
3709
3714
onComment : CommentHandler | null ;
3710
3715
/** Current file being parsed. */
3711
3716
currentSource : Source | null ;
3712
- /** Dependency map * */
3713
- dependees : Map < string , Source > ;
3717
+ /** Map of dependees being depended upon by a source, by path. */
3718
+ dependees : Map < string , Dependee > ;
3714
3719
/** An array of parsed sources. */
3715
3720
sources : Source [ ] ;
3716
3721
/** Constructs a new parser. */
3717
3722
constructor ( diagnostics ?: DiagnosticMessage [ ] | null , sources ?: Source [ ] | null ) ;
3718
3723
/** Parses a file and adds its definitions to the program. */
3719
3724
parseFile (
3720
- /** Source text of the file. */
3721
- text : string ,
3725
+ /** Source text of the file, or `null` to indicate not found . */
3726
+ text : string | null ,
3722
3727
/** Normalized path of the file. */
3723
3728
path : string ,
3724
3729
/** Whether this is an entry file. */
@@ -3727,7 +3732,7 @@ declare module "assemblyscript/src/parser" {
3727
3732
parseTopLevelStatement ( tn : Tokenizer , namespace ?: NamespaceDeclaration | null ) : Statement | null ;
3728
3733
/** Obtains the next file to parse. */
3729
3734
nextFile ( ) : string | null ;
3730
- /** Obtains the dependee of the given imported file. */
3735
+ /** Obtains the path of the dependee of the given imported file. */
3731
3736
getDependee ( dependent : string ) : string | null ;
3732
3737
/** Finishes parsing. */
3733
3738
finish ( ) : void ;
@@ -3815,6 +3820,7 @@ declare module "assemblyscript/src/parser" {
3815
3820
MEMBERACCESS = 20 ,
3816
3821
GROUPING = 21
3817
3822
}
3823
+ export { } ;
3818
3824
}
3819
3825
declare module "assemblyscript/src/program" {
3820
3826
/**
@@ -6150,8 +6156,8 @@ declare module "assemblyscript/src/index" {
6150
6156
export function parse (
6151
6157
/** Program reference. */
6152
6158
program : Program ,
6153
- /** Source text of the file. */
6154
- text : string ,
6159
+ /** Source text of the file, or `null` to indicate not found . */
6160
+ text : string | null ,
6155
6161
/** Normalized path of the file. */
6156
6162
path : string ,
6157
6163
/** Whether this is an entry file. */
0 commit comments