@@ -842,6 +842,7 @@ declare module "assemblyscript/src/tokenizer" {
842842 readFloat ( ) : number ;
843843 readDecimalFloat ( ) : number ;
844844 readHexFloat ( ) : number ;
845+ readHexadecimalEscape ( remain ?: number ) : string ;
845846 readUnicodeEscape ( ) : string ;
846847 private readExtendedUnicodeEscape ;
847848 finish ( ) : void ;
@@ -862,7 +863,7 @@ declare module "assemblyscript/src/ast" {
862863 * @module ast
863864 */ /***/
864865 import { CommonFlags } from "assemblyscript/src/common" ;
865- import { Token , Tokenizer , Range } from "assemblyscript/src/tokenizer" ;
866+ import { Token , Range } from "assemblyscript/src/tokenizer" ;
866867 export { Token , Range } ;
867868 /** Indicates the kind of a node. */
868869 export enum NodeKind {
@@ -932,10 +933,6 @@ declare module "assemblyscript/src/ast" {
932933 }
933934 /** Checks if a node represents a constant value. */
934935 export function nodeIsConstantValue ( kind : NodeKind ) : boolean ;
935- /** Checks if a node might be callable. */
936- export function nodeIsCallable ( kind : NodeKind ) : boolean ;
937- /** Checks if a node might be callable with generic arguments. */
938- export function nodeIsGenericCallable ( kind : NodeKind ) : boolean ;
939936 /** Base class of all nodes. */
940937 export abstract class Node {
941938 /** Node kind indicator. */
@@ -966,7 +963,7 @@ declare module "assemblyscript/src/ast" {
966963 static createFunctionExpression ( declaration : FunctionDeclaration ) : FunctionExpression ;
967964 static createInstanceOfExpression ( expression : Expression , isType : TypeNode , range : Range ) : InstanceOfExpression ;
968965 static createIntegerLiteralExpression ( value : I64 , range : Range ) : IntegerLiteralExpression ;
969- static createNewExpression ( expression : Expression , typeArgs : TypeNode [ ] | null , args : Expression [ ] , range : Range ) : NewExpression ;
966+ static createNewExpression ( typeName : TypeName , typeArgs : TypeNode [ ] | null , args : Expression [ ] , range : Range ) : NewExpression ;
970967 static createNullExpression ( range : Range ) : NullExpression ;
971968 static createObjectLiteralExpression ( names : IdentifierExpression [ ] , values : Expression [ ] , range : Range ) : ObjectLiteralExpression ;
972969 static createParenthesizedExpression ( expression : Expression , range : Range ) : ParenthesizedExpression ;
@@ -1266,8 +1263,18 @@ declare module "assemblyscript/src/ast" {
12661263 value : I64 ;
12671264 }
12681265 /** Represents a `new` expression. Like a call but with its own kind. */
1269- export class NewExpression extends CallExpression {
1266+ export class NewExpression extends Expression {
12701267 kind : NodeKind ;
1268+ /** Type being constructed. */
1269+ typeName : TypeName ;
1270+ /** Provided type arguments. */
1271+ typeArguments : TypeNode [ ] | null ;
1272+ /** Provided arguments. */
1273+ arguments : Expression [ ] ;
1274+ /** Gets the type arguments range for reporting. */
1275+ get typeArgumentsRange ( ) : Range ;
1276+ /** Gets the arguments range for reporting. */
1277+ get argumentsRange ( ) : Range ;
12711278 }
12721279 /** Represents a `null` expression. */
12731280 export class NullExpression extends IdentifierExpression {
@@ -1390,12 +1397,10 @@ declare module "assemblyscript/src/ast" {
13901397 statements : Statement [ ] ;
13911398 /** Full source text. */
13921399 text : string ;
1393- /** Tokenizer reference. */
1394- tokenizer : Tokenizer | null ;
13951400 /** Source map index. */
13961401 debugInfoIndex : number ;
13971402 /** Re-exported sources. */
1398- exportPaths : Set < string > | null ;
1403+ exportPaths : string [ ] | null ;
13991404 /** Constructs a new source node. */
14001405 constructor ( normalizedPath : string , text : string , kind : SourceKind ) ;
14011406 /** Checks if this source represents native code. */
@@ -4840,7 +4845,7 @@ declare module "assemblyscript/src/parser" {
48404845 import { Program } from "assemblyscript/src/program" ;
48414846 import { Tokenizer , CommentHandler } from "assemblyscript/src/tokenizer" ;
48424847 import { DiagnosticEmitter } from "assemblyscript/src/diagnostics" ;
4843- import { Source , TypeNode , FunctionTypeNode , Expression , ClassExpression , FunctionExpression , Statement , BlockStatement , BreakStatement , ClassDeclaration , ContinueStatement , DeclarationStatement , DecoratorNode , DoStatement , EnumDeclaration , EnumValueDeclaration , ExportImportStatement , ExportMember , ExportStatement , ExpressionStatement , ForStatement , FunctionDeclaration , IfStatement , ImportDeclaration , ImportStatement , IndexSignatureDeclaration , NamespaceDeclaration , ParameterNode , ReturnStatement , SwitchCase , SwitchStatement , ThrowStatement , TryStatement , TypeDeclaration , TypeParameterNode , VariableStatement , VariableDeclaration , VoidStatement , WhileStatement } from "assemblyscript/src/ast" ;
4848+ import { Source , TypeNode , TypeName , FunctionTypeNode , Expression , ClassExpression , FunctionExpression , Statement , BlockStatement , BreakStatement , ClassDeclaration , ContinueStatement , DeclarationStatement , DecoratorNode , DoStatement , EnumDeclaration , EnumValueDeclaration , ExportImportStatement , ExportMember , ExportStatement , ExpressionStatement , ForStatement , FunctionDeclaration , IfStatement , ImportDeclaration , ImportStatement , IndexSignatureDeclaration , NamespaceDeclaration , ParameterNode , ReturnStatement , SwitchCase , SwitchStatement , ThrowStatement , TryStatement , TypeDeclaration , TypeParameterNode , VariableStatement , VariableDeclaration , VoidStatement , WhileStatement } from "assemblyscript/src/ast" ;
48444849 /** Parser interface. */
48454850 export class Parser extends DiagnosticEmitter {
48464851 /** Program being created. */
@@ -4875,6 +4880,8 @@ declare module "assemblyscript/src/parser" {
48754880 getDependee ( dependent : string ) : string | null ;
48764881 /** Finishes parsing and returns the program. */
48774882 finish ( ) : Program ;
4883+ /** Parses a type name. */
4884+ parseTypeName ( tn : Tokenizer ) : TypeName | null ;
48784885 /** Parses a type. */
48794886 parseType ( tn : Tokenizer , acceptParenthesized ?: boolean , suppressErrors ?: boolean ) : TypeNode | null ;
48804887 private tryParseSignatureIsSignature ;
@@ -5098,6 +5105,7 @@ declare module "assemblyscript/src/extra/ast" {
50985105 visitAssertionExpression ( node : AssertionExpression ) : void ;
50995106 visitBinaryExpression ( node : BinaryExpression ) : void ;
51005107 visitCallExpression ( node : CallExpression ) : void ;
5108+ private visitArguments ;
51015109 visitClassExpression ( node : ClassExpression ) : void ;
51025110 visitCommaExpression ( node : CommaExpression ) : void ;
51035111 visitElementAccessExpression ( node : ElementAccessExpression ) : void ;
0 commit comments