@@ -1023,7 +1023,7 @@ declare module "assemblyscript/src/ast" {
10231023 static createDoStatement ( statement : Statement , condition : Expression , range : Range ) : DoStatement ;
10241024 static createEmptyStatement ( range : Range ) : EmptyStatement ;
10251025 static createEnumDeclaration ( name : IdentifierExpression , members : EnumValueDeclaration [ ] , decorators : DecoratorNode [ ] | null , flags : CommonFlags , range : Range ) : EnumDeclaration ;
1026- static createEnumValueDeclaration ( name : IdentifierExpression , value : Expression | null , flags : CommonFlags , range : Range ) : EnumValueDeclaration ;
1026+ static createEnumValueDeclaration ( name : IdentifierExpression , initializer : Expression | null , flags : CommonFlags , range : Range ) : EnumValueDeclaration ;
10271027 static createExportStatement ( members : ExportMember [ ] | null , path : StringLiteralExpression | null , isDeclare : boolean , range : Range ) : ExportStatement ;
10281028 static createExportDefaultStatement ( declaration : DeclarationStatement , range : Range ) : ExportDefaultStatement ;
10291029 static createExportImportStatement ( name : IdentifierExpression , externalName : IdentifierExpression , range : Range ) : ExportImportStatement ;
@@ -1483,8 +1483,6 @@ declare module "assemblyscript/src/ast" {
14831483 }
14841484 /** Represents a value of an `enum` declaration. */
14851485 export class EnumValueDeclaration extends VariableLikeDeclarationStatement {
1486- /** Value expression. */
1487- value : Expression | null ;
14881486 }
14891487 /** Represents an `export import` statement of an interface. */
14901488 export class ExportImportStatement extends Statement {
@@ -3007,14 +3005,11 @@ declare module "assemblyscript/src/parser" {
30073005 * @license Apache-2.0
30083006 */
30093007 import { CommonFlags } from "assemblyscript/src/common" ;
3010- import { Program } from "assemblyscript/src/program" ;
30113008 import { Tokenizer , CommentHandler } from "assemblyscript/src/tokenizer" ;
3012- import { DiagnosticEmitter } from "assemblyscript/src/diagnostics" ;
3009+ import { DiagnosticEmitter , DiagnosticMessage } from "assemblyscript/src/diagnostics" ;
30133010 import { Source , TypeNode , TypeName , FunctionTypeNode , Expression , ClassExpression , FunctionExpression , Statement , BlockStatement , BreakStatement , ClassDeclaration , ContinueStatement , DeclarationStatement , DecoratorNode , DoStatement , EnumDeclaration , EnumValueDeclaration , ExportImportStatement , ExportMember , ExportStatement , ExpressionStatement , ForOfStatement , FunctionDeclaration , IfStatement , ImportDeclaration , ImportStatement , IndexSignatureDeclaration , NamespaceDeclaration , ParameterNode , ReturnStatement , SwitchCase , SwitchStatement , ThrowStatement , TryStatement , TypeDeclaration , TypeParameterNode , VariableStatement , VariableDeclaration , VoidStatement , WhileStatement } from "assemblyscript/src/ast" ;
30143011 /** Parser interface. */
30153012 export class Parser extends DiagnosticEmitter {
3016- /** Program being created. */
3017- program : Program ;
30183013 /** Source file names to be requested next. */
30193014 backlog : string [ ] ;
30203015 /** Source file names already seen, that is processed or backlogged. */
@@ -3027,8 +3022,10 @@ declare module "assemblyscript/src/parser" {
30273022 currentSource : Source ;
30283023 /** Dependency map **/
30293024 dependees : Map < string , Source > ;
3025+ /** An array of parsed sources. */
3026+ sources : Source [ ] ;
30303027 /** Constructs a new parser. */
3031- constructor ( program : Program ) ;
3028+ constructor ( diagnostics ?: DiagnosticMessage [ ] | null , sources ?: Source [ ] | null ) ;
30323029 /** Parses a file and adds its definitions to the program. */
30333030 parseFile (
30343031 /** Source text of the file. */
0 commit comments