Skip to content

Commit

Permalink
Renamed AST nodes for teh assembler.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 4, 2020
1 parent bacc440 commit f02c7db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions packages/asm/src.ts/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,15 @@ export abstract class Node {
}
}

/*
export abstract class CodeNode extends Node {
constructor(guard: any, location: Location, options: { [ key: string ]: any }) {
logger.checkAbstract(new.target, CodeNode);
super(guard, location, options);
}
}

export abstract class ValueNode extends CodeNode {
*/
export abstract class ValueNode extends Node {
constructor(guard: any, location: Location, options: { [ key: string ]: any }) {
logger.checkAbstract(new.target, ValueNode);
super(guard, location, options);
Expand Down Expand Up @@ -358,7 +359,7 @@ export class OpcodeNode extends ValueNode {
}
}

export abstract class LabelledNode extends CodeNode {
export abstract class LabelledNode extends Node {
readonly name: string;

constructor(guard: any, location: Location, name: string, values?: { [ key: string ]: any }) {
Expand Down Expand Up @@ -467,7 +468,7 @@ export class EvaluationNode extends ValueNode {
}
}

export class ExecutionNode extends CodeNode {
export class ExecutionNode extends Node {
readonly script: string;

constructor(guard: any, location: Location, script: string) {
Expand Down
3 changes: 1 addition & 2 deletions packages/asm/src.ts/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

import { assemble, CodeNode, DataNode, disassemble, EvaluationNode, ExecutionNode, formatBytecode, LabelNode, LabelledNode, LinkNode, LiteralNode, Node, OpcodeNode, parse, ScopeNode, ValueNode } from "./assembler";
import { assemble, DataNode, disassemble, EvaluationNode, ExecutionNode, formatBytecode, LabelNode, LabelledNode, LinkNode, LiteralNode, Node, OpcodeNode, parse, ScopeNode, ValueNode } from "./assembler";
import { Opcode } from "./opcodes";

import { AssemblerOptions, AssembleVisitFunc, Bytecode, Location, Operation, VisitFunc } from "./assembler";
Expand All @@ -16,7 +16,6 @@ export {
parse,

// Assembly AST Nodes
CodeNode,
DataNode,
EvaluationNode,
ExecutionNode,
Expand Down

0 comments on commit f02c7db

Please sign in to comment.