ariatemplates/noder-js — pull request #10 by divdavem (2014-05-21 10:03:21+00:00)
Title: acorn is now called on the unmodified source file to report errors.

This pull request fixes an issue with the error message reporting syntax errors.

For example, with the following `myModule.js` file (containing 3 lines):

```js
// The following line intentionally contains an error
myError.

```

The reported error contained:
```
Error: Unexpected token in 'myModule.js' (line 5, column 0):
})
^-
failed to load definition of module 'myModule.js'
failed to preload 'myModule.js'
```

The error is line 5 whereas the source file only contains 3 lines.
That's because noder wraps the code in a function (making the file larger than 3 lines...).
This pull request fixes this issue by making sure the code passed to `acorn` to validate the syntax is only the source code, without the wrapping function.