sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

fix(ast): Rename `location` to `loc` in AST #664

Open sjbarag opened 3 years ago

sjbarag commented 3 years ago

BREAKING CHANGE: There's nothing inherently wrong with having AST node locations in a property called node, but it does break compatibility with more common ASTs like the estree standard and makes integration with tools that understand estree significantly more difficult. Rename location to loc in the entire brs syntax tree to improve estree compatibility and enable more advanced eslint rules.

sjbarag commented 3 years ago

This will require a few small changes in https://github.com/hulu/roca when this lands. If we'd already hit 1.0 I'd say this requires 2.0.0, buuuuuuuuut we haven't. Once I add range support to those nodes (luckily just an additive change) we might be able to consider a 1.0 release 🤔

sjbarag commented 3 years ago

Either way, this probably warrants a -rc release.