https://github.com/realyuniquename/sourcemap
Source maps support for Haxe
https://github.com/realyuniquename/sourcemap
map source sourcemap sourcemaps
Last synced: 8 months ago
JSON representation
Source maps support for Haxe
- Host: GitHub
- URL: https://github.com/realyuniquename/sourcemap
- Owner: RealyUniqueName
- License: mit
- Created: 2017-02-22T18:28:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-10-05T07:03:05.000Z (over 2 years ago)
- Last Synced: 2025-02-16T17:56:14.156Z (11 months ago)
- Topics: map, source, sourcemap, sourcemaps
- Language: Haxe
- Size: 14.6 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Source maps
Cross platform source map parser for Haxe programming language.
## Usage
```haxe
import sourcemap.SourcePos;
class Main {
static public function main() {
var data = "Contents of some .js.map file";
var map = new SourceMap(data);
var pos : SourcePos = map.originalPositionFor(1, 3);
trace(pos);
/*
Outputs:
{
generatedLine:1,
generatedColumn:3,
originalColumn:10,
originalLine:3,
source:"/path/to/Test.hx",
name:"methodName"
}
*/
map.eachMapping(function (pos:SourcePos) {
trace(pos);
});
}
}
```