 # indented block of code -- the implementation of a function, a clause in an
 # `if`, `switch`, or `try`, and so on...
 exports.Expressions = class Expressions extends Base
-
-  children: ['expressions']
-
   (nodes) ->
     @expressions = compact flatten nodes or []
+
+  children: ['expressions']
 
   # Tack an expression on to the end of this expression list.
   push: (node) ->


# A `[ ... ]` indexed accessor into an array or object.
exports.Index = class Index extends Base

  children: ['index']

  (@index) ->

  compile: (o) ->
    (if @proto then '.prototype' else '') + "[#{ @index.compile o, LEVEL_PAREN }]"

    @body    = Expressions.wrap [body]
    @pattern = @name instanceof Value
    @returns = false

  children: ['body', 'source', 'guard', 'step', 'from', 'to']

  isStatement: YES

  makeReturn: ->
    @returns = yes
