   constructor: ->
     # fill command objects with actual instances (we use bound methods for convenience
     # for debug, but static methods would work too)
-    @commandObjects = {}
-    @commandObjects[Commands.HELP] = new HelpCommand
-    @commandObjects[Commands.LS] = new LsCommand
-    @commandObjects[Commands.CONNECT] = new ConnectCommand
+    @commandObjects =
+      "VOID": new VoidCommand
+      "HELP": new HelpCommand
+      "LS": new LsCommand
+      "CONNECT": new ConnectCommand
 
   # Parse a command and return a syntax tree made of tokens
   # Throw an exception if a parsing error occurs


# IMPROVE: use strings instead of "enum" tokens and just use a dictionary to match
# each string to a command object in CommandInterpreter constructor
Commands =
  HELP: "help",
  LS: "ls",
  CONNECT: "connect"

CommandStrings =
  "help": Commands.HELP,
  "ls": Commands.LS,
  "dir": Commands.LS,
  "connect": Commands.CONNECT,

  execute: (args, terminal) =>
    throw "#{this} has not implemented the 'execute' method."

class @VoidCommand extends Command

  # do nothing
  execute: (args, terminal) =>

  toString: ->
    "VOID command"

class @HelpCommand extends Command

