 class DiceError extends SyntaxError
   constructor: (@message) ->
     @name = "DiceError"
+
+ZERO =
+  type: "Number"
+  value: 0
 
 randInt = (min, max) ->
   values = max - min + 1

        throw "Bad unary operation: #{op}"

  roll: (dice, sides) =>
    result = (randInt(1,sides) for i in [1..dice]).reduce (t, s) -> t + s
    @dice_rolled.push
      dice: dice

      when '#'
        (times, ast) =>
          count = @interpret_subroll times
          unless count > 0
            throw new DiceError "Cannot roll #{count} times, minimum 1."
          for _ in [1...count]
            @interpret_subroll ast
          @interpret_node ast
