Documentation ¶
Overview ¶
Package scan wraps itself around text/scanner to provide a more compiler friendly interface. The intent is to provide a smaller snapshot of the scanning process to make the learning process more approachable at an early stage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { Lit string // the literal, textual value of the lexem Pos scanner.Position // start position of the literal Tok Token // the token representing the lexem }
Item contains the literal-token pairs of each lexical element lexed by the scanner
type Scanner ¶
Scanner embeds text/scanner.Scanner and provides facilities to send scanized lexems via the Items channel. Any errors are sent via the Errors channel
Click to show internal directories.
Click to hide internal directories.