crypto icon indicating copy to clipboard operation
crypto copied to clipboard

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

Open sjbarag opened this issue 4 years ago • 2 comments

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 avatar Jun 30 '21 23:06 sjbarag

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 avatar Jun 30 '21 23:06 sjbarag

Either way, this probably warrants a -rc release.

sjbarag avatar Jul 01 '21 17:07 sjbarag