LexicalContext
public protocol LexicalContext
A lexical context summarises the of a String
being scanned by a LexicalAnalyzer
between two marks. It is generated when the LexicalAnalyzer
is advanced
confirming that the last rule was essentially matched.
-
The range from the
LexicalAnalyzer.mark()
to the point at whichLexicalAnalyzer.proceed()->LexicalContext
was calledDeclaration
Swift
var range: Range<String.UnicodeScalarView.Index> { get }
-
The string being scanned
Declaration
Swift
var source: String { get }
-
The substring that was matched and is catpured by the
range
Declaration
Swift
var matchedString: String { get }