       else if top
         node.front = true
         fragments = node.compileToFragments o
+        if @exportAll then node.match [  # add assignment in here
+          Class, Code, () =>
+            fragments.unshift @makeCode "export "
+        ]
         unless node.isStatement o
           fragments.unshift @makeCode "#{@tab}"
           fragments.push @makeCode ";"

  matchedAttributes: []

# Pattern matching utilities
exports.matchNode = matchNode = (pattern, node, match) ->
  if pattern instanceof MatchCapture
    match[pattern.name] = node

    for [p, e] in underscore.zip(pattern, node)
      matchNode(p, e, match)

  else if underscore.isFunction(pattern) and node instanceof pattern
    return yes

  # TODO: `Several` for mapping pattern matching over array
