mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 09:21:35 +00:00
Fix some map issues; Simplify internal ArrayBuffer API a bit
This commit is contained in:
11
src/ast.ts
11
src/ast.ts
@ -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 {
|
||||
|
||||
|
Reference in New Issue
Block a user