ratel-rust / ratel-core

High performance JavaScript to JavaScript compiler with a Rust core
Apache License 2.0
435 stars 17 forks source link

Use Span to represent source locations #115

Open ishitatsuyuki opened 5 years ago

ishitatsuyuki commented 5 years ago

Span seems to be a quite common thing in parsers, and it's also very useful when it comes to source map (#98, sourcemaps uses line and column instead of byte position).

Instead of reimplementing these functionality in-house, there seems to be a good crate, codespan that is used by the Gluon scripting language. Let's integrate it (and give them a shout out)!