Major Changes
-
#435
e4f5c4eThanks @ota-meshi! - Replace@astrojs/compilerwith@astrojs/compiler-rs.This changes the compiler AST returned by the public
parseTemplate()API and
can change generated AST node shapes, source ranges, and parser diagnostics.The following
ParseTemplateResulthelpers have been removed:getEndOffsetcalcAttributeValueStartOffsetcalcAttributeEndOffset
Use the new compiler nodes'
startandendoffsets where applicable.
getLocFromIndexandgetIndexFromLocremain available for converting between
offsets and locations.The
walkhelper now visits the new compiler node types and passes a
WalkContextas the third callback argument. The context provides
skipChildren()andbreak()controls. Consumers ofparseTemplate()should
update their visitor types and any AST or parser-error snapshots for the new
compiler output.