Fix some map issues; Simplify internal ArrayBuffer API a bit

This commit is contained in:
dcodeIO
2018-06-20 15:51:47 +02:00
parent 48e96cbcf5
commit dd4be7b693
14 changed files with 17159 additions and 1132 deletions

View File

@ -99,6 +99,17 @@ export enum NodeKind {
COMMENT
}
/** Checks if a node represents a constant value. */
export function nodeIsConstantValue(kind: NodeKind): bool {
switch (kind) {
case NodeKind.LITERAL:
case NodeKind.NULL:
case NodeKind.TRUE:
case NodeKind.FALSE: return true;
}
return false;
}
/** Base class of all nodes. */
export abstract class Node {