     
   findFunctions: ->
     functions = []
-    rx = /(\w+) (\w+)\((.*?)\) {/
+    rx = /(\w+)[\s\t\n]+(\w+)[\s\t\n]*\([\s\t\n]*[\s\t\n]*(.*?)[\s\t\n]*\)[\s\t\n]*{/
     src = @src
     while match = rx.exec src
       offsetStart = match.index

        offsetEnd += remainder.length + 1
        # consume terminators to prevent empty statements
        offsetEnd++ if code[offsetEnd] == ';'
        imp = /^(.*?), (.*)$/.exec remainder
        imp =
          fullMatch: code[offsetStart...offsetEnd]
          name: imp[1]

    
  processExportsAndImports: (code) ->
    exports = []
    rx = /export[\s\t\n]*\(/
    offset = 0
    exportID = 0
    while match = rx.exec code[offset..-1]
