TypealiasSwiftGrammar

Location

The index type of the ParsingInput.source this rule expects.

typealias Location = Element.Location

Overview

Parsing rules must be associated with a source location type because some applications may wish to store these indices in the returned Constructions. If the source location type were not fixed, then different calls to parse(_:) could potentially return constructions of varying types, which would require additional abstraction, which would be inefficient.