Rename lib prefix to '~lib' (parens aren't valid); Add built-in alignof<T>; Prepare for ArrayBufferView

This commit is contained in:
dcodeIO
2018-04-02 19:05:26 +02:00
parent 3b50720603
commit 06198a3723
51 changed files with 2286 additions and 2209 deletions

View File

@ -534,7 +534,7 @@ export abstract class Node {
identifier: IdentifierExpression,
typeParameters: TypeParameterNode[],
extendsType: TypeNode | null, // can't be a function
implementsTypes: TypeNode[], // can't be a function
implementsTypes: TypeNode[] | null, // can't be functions
members: DeclarationStatement[],
decorators: DecoratorNode[] | null,
flags: CommonFlags,
@ -546,7 +546,7 @@ export abstract class Node {
stmt.name = identifier; identifier.parent = stmt;
stmt.typeParameters = typeParameters; setParent(typeParameters, stmt);
stmt.extendsType = extendsType; if (extendsType) extendsType.parent = stmt;
stmt.implementsTypes = implementsTypes; setParent(implementsTypes, stmt);
stmt.implementsTypes = implementsTypes; if (implementsTypes) setParent(implementsTypes, stmt);
stmt.members = members; setParent(members, stmt);
stmt.decorators = decorators; if (decorators) setParent(decorators, stmt);
return stmt;
@ -756,8 +756,10 @@ export abstract class Node {
static createInterfaceDeclaration(
name: IdentifierExpression,
typeParameters: TypeParameterNode[],
extendsType: TypeNode | null, // can't be a function
members: DeclarationStatement[],
decorators: DecoratorNode[] | null,
flags: CommonFlags,
range: Range
): InterfaceDeclaration {
@ -765,8 +767,10 @@ export abstract class Node {
stmt.range = range;
stmt.flags = flags;
stmt.name = name; name.parent = stmt;
stmt.typeParameters = typeParameters; if (typeParameters) setParent(typeParameters, stmt);
stmt.extendsType = extendsType; if (extendsType) extendsType.parent = stmt;
stmt.members = members; setParent(members, stmt);
stmt.decorators = decorators; if (decorators) setParent(decorators, stmt);
return stmt;
}
@ -1487,10 +1491,10 @@ export class ClassDeclaration extends DeclarationStatement {
/** Accepted type parameters. */
typeParameters: TypeParameterNode[];
/** Base class type being extended. */
/** Base class type being extended, if any. */
extendsType: TypeNode | null; // can't be a function
/** Interface types being implemented. */
implementsTypes: TypeNode[]; // can't be a function
/** Interface types being implemented, if any. */
implementsTypes: TypeNode[] | null; // can't be functions
/** Class member declarations. */
members: DeclarationStatement[];