User:Conrad.Irwin/parserState

At the moment:

$wgParser is the only parser around, lots of per-parse state is trampled ever time an entry point is called.

Plan:

Create a new "object" or hijack some of the existing ones, to encapsulate per-parse state as seperate from parser state (and ideally as seperate from globals too :p).

Observations:

Some state is currently in the wrong place, $wgContLang needs to be per-parse so that {{int: can work.

Some "entry points" care about different amounts of the state (getTransclusionText and extractSections don't need to know about the Title for example)

It should be possible to fix this without touching the parsing logic.