@@ -2835,7 +2835,7 @@ declare module "assemblyscript/src/resolver" {
28352835 * @license Apache-2.0
28362836 */
28372837 import { DiagnosticEmitter } from "assemblyscript/src/diagnostics" ;
2838- import { Program , Element , Class , ClassPrototype , Function , FunctionPrototype } from "assemblyscript/src/program" ;
2838+ import { Program , Element , Class , ClassPrototype , Function , FunctionPrototype , Property , PropertyPrototype } from "assemblyscript/src/program" ;
28392839 import { Flow } from "assemblyscript/src/flow" ;
28402840 import { TypeNode , TypeName , TypeParameterNode , Node , IdentifierExpression , CallExpression , Expression } from "assemblyscript/src/ast" ;
28412841 import { Type } from "assemblyscript/src/types" ;
@@ -3058,6 +3058,12 @@ declare module "assemblyscript/src/resolver" {
30583058 reportNode : Node ,
30593059 /** How to proceed with eventual diagnostics. */
30603060 reportMode ?: ReportMode ) : Class | null ;
3061+ /** Resolves a property prototype. */
3062+ resolveProperty (
3063+ /** The prototype of the property. */
3064+ prototype : PropertyPrototype ,
3065+ /** How to proceed with eventual diagnostics. */
3066+ reportMode ?: ReportMode ) : Property | null ;
30613067 }
30623068}
30633069declare module "assemblyscript/src/parser" {
@@ -4018,15 +4024,23 @@ declare module "assemblyscript/src/program" {
40184024 getterPrototype : FunctionPrototype | null ;
40194025 /** Setter prototype. */
40204026 setterPrototype : FunctionPrototype | null ;
4027+ /** Property instance, if resolved. */
4028+ instance : Property | null ;
4029+ /** Clones of this prototype that are bound to specific classes. */
4030+ private boundPrototypes ;
40214031 /** Constructs a new property prototype. */
40224032 constructor (
40234033 /** Simple name. */
40244034 name : string ,
4025- /** Parent class. */
4026- parent : ClassPrototype ,
4035+ /** Parent element. Either a class prototype or instance . */
4036+ parent : Element ,
40274037 /** Declaration of the getter or setter introducing the property. */
40284038 firstDeclaration : FunctionDeclaration ) ;
40294039 lookup ( name : string ) : Element | null ;
4040+ /** Tests if this prototype is bound to a class. */
4041+ get isBound ( ) : boolean ;
4042+ /** Creates a clone of this prototype that is bound to a concrete class instead. */
4043+ toBound ( classInstance : Class ) : PropertyPrototype ;
40304044 }
40314045 /** A resolved property. */
40324046 export class Property extends VariableLikeElement {
@@ -5199,7 +5213,6 @@ declare module "assemblyscript/src/definitions" {
51995213 visitElement ( name : string , element : Element ) : void ;
52005214 private visitFunctionInstances ;
52015215 private visitClassInstances ;
5202- private visitPropertyInstances ;
52035216 abstract visitGlobal ( name : string , element : Global ) : void ;
52045217 abstract visitEnum ( name : string , element : Enum ) : void ;
52055218 abstract visitFunction ( name : string , element : Function ) : void ;
0 commit comments