1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
Commit Graph

6 Commits

Author SHA1 Message Date
Steven Hartland
7009038f79
fix: linting errors (#441)
Disable new linters which aren't compatible with this code module.

Upgrade github actions to fix caching issues.

Run go mod to bring in new styling.

Remove space on nolint declarations.

Apply all changes to whitespace as required to pass goimports linter.

Only trigger checks on pull_request which works for pulls from other
forks, where as push only works from the same repo.
2022-10-08 00:12:19 +01:00
Steven Hartland
58e9cfdd5d
Revert "Update sourcemaps to v2 (#293)" (#296)
This reverts commit 67b2826a26.
2018-03-03 15:22:00 +00:00
Eric Reis Figueiredo
67b2826a26 Update sourcemaps to v2 (#293)
Update sourcemaps to gopkg.in/sourcemap.v2 in order to avoid possible golang error discussed in #291
2018-03-03 10:15:14 +00:00
deoxxa
bd5fb254e3 add source map support
This patch implements source map support in the parser, the runtime, the
script record, and the stack trace printing.

The library used to parse and use the source maps is gopkg.in/sourcemap.v1.
Unlike earlier versions of this patch, the consumer of otto does not need
parse the source map on their own - it's now handled similarly to parsing
JavaScript content.

To use a source map, the consumer must explicitly parse their source into
a `Script` object with `Otto.CompileWithSourceMap`. The script record
returned from that call will carry source map information with it, and
all location-related functions should reflect the original source
positions.
2016-05-02 19:34:04 +10:00
Robert Krimen
e6768252c2 Improve error reporting
* Delay entering global scope on code evaluation, not runtime creation

This fixes #66
2014-06-12 21:27:32 -07:00
Robert Krimen
ad8a97c028 New parser
* Faster, more straightforward, etc.
* More advanced object literals (get ..., set ...)
* More tests using JavaScript from the wild (http://cdnjs.com/)
2014-04-10 20:42:25 -07:00