03:36
<Danielle Church>

Ooh, I think I've just come up with a better way to describe PA!

Parser Augmentation is two things:

  1. an addition to the ECMAScript syntactic grammar for making assertions about the source text that follows, such as whether it's a script or a module, strict or not, whether there are any var declarations after first point of use, whether it has type assertions and what kind, what experimental operators it uses, etc.
  2. an optional runtime API that allows ECMAScript code to instruct the parser on how to polyfill any unknown assertions (or which ones can be safely ignored), by presenting an interface designed to allow engines to optimize their parser performance even with unexpected or unusual syntaxes.