Use callbacks for speculative parsing.
Merge pull request #1378 from Microsoft/useCallbacksForSpeculativeParsing

Use callbacks for speculative parsing.