@@ -3697,6 +3697,11 @@ declare module "assemblyscript/src/parser" {
36973697 import { Tokenizer , CommentHandler } from "assemblyscript/src/tokenizer" ;
36983698 import { DiagnosticEmitter , DiagnosticMessage } from "assemblyscript/src/diagnostics" ;
36993699 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+ }
37003705 /** Parser interface. */
37013706 export class Parser extends DiagnosticEmitter {
37023707 /** Source file names to be requested next. */
@@ -3709,16 +3714,16 @@ declare module "assemblyscript/src/parser" {
37093714 onComment : CommentHandler | null ;
37103715 /** Current file being parsed. */
37113716 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 > ;
37143719 /** An array of parsed sources. */
37153720 sources : Source [ ] ;
37163721 /** Constructs a new parser. */
37173722 constructor ( diagnostics ?: DiagnosticMessage [ ] | null , sources ?: Source [ ] | null ) ;
37183723 /** Parses a file and adds its definitions to the program. */
37193724 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 ,
37223727 /** Normalized path of the file. */
37233728 path : string ,
37243729 /** Whether this is an entry file. */
@@ -3727,7 +3732,7 @@ declare module "assemblyscript/src/parser" {
37273732 parseTopLevelStatement ( tn : Tokenizer , namespace ?: NamespaceDeclaration | null ) : Statement | null ;
37283733 /** Obtains the next file to parse. */
37293734 nextFile ( ) : string | null ;
3730- /** Obtains the dependee of the given imported file. */
3735+ /** Obtains the path of the dependee of the given imported file. */
37313736 getDependee ( dependent : string ) : string | null ;
37323737 /** Finishes parsing. */
37333738 finish ( ) : void ;
@@ -3815,6 +3820,7 @@ declare module "assemblyscript/src/parser" {
38153820 MEMBERACCESS = 20 ,
38163821 GROUPING = 21
38173822 }
3823+ export { } ;
38183824}
38193825declare module "assemblyscript/src/program" {
38203826 /**
@@ -6150,8 +6156,8 @@ declare module "assemblyscript/src/index" {
61506156 export function parse (
61516157 /** Program reference. */
61526158 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 ,
61556161 /** Normalized path of the file. */
61566162 path : string ,
61576163 /** Whether this is an entry file. */
0 commit comments