<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'main/command.go')
-rw-r--r--main/command.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/command.go b/main/command.go
index 44fd9eb..63cc3b8 100644
--- a/main/command.go
+++ b/main/command.go
@@ -207,4 +207,16 @@ func (cmd JumpCommand) exec(state *ProgramState) {
}
func (cmd JumpCommand) String() string {
return fmt.Sprintf("b%v", cmd.destination)
+}
+
+// Placeholder as the branch destination may not have been parsed when the branch command is
+// Should never appear in a program to actually be run
+type BranchPlaceholderCommand struct {
+ label rune
+}
+func (cmd BranchPlaceholderCommand) exec(state *ProgramState) {
+ panic("Tried to execute a BranchPlaceholderCommand!!!")
+}
+func (cmd BranchPlaceholderCommand) String() string {
+ return fmt.Sprintf("b%c", cmd.label)
} \ No newline at end of file