Package scanner provides a scanner and tokenizer for UTF-8-encoded text. It takes an io.Reader providing the source, which then can be tokenized through repeated calls to the Scan function. For compatibility with existing tools, the NUL character is not allowed. If the first character in the source is a UTF-8 encoded byte order mark (BOM), it is discarded.

By default, a Scanner skips white space and Go comments and recognizes all literals as defined by the Go language specification. It may be customized to recognize only a subset of those literals and to recognize different identifier and white space characters.

Static methods

staticinlinetestError(_t:Ref<T_>):Void

staticinlinetestIOError(_t:Ref<T_>):Void

staticinlinetestInvalidExponent(_t:Ref<T_>):Void

staticinlinetestIssue29723(_t:Ref<T_>):Void

staticinlinetestIssue30320(_t:Ref<T_>):Void

staticinlinetestIssue50909(_t:Ref<T_>):Void

staticinlinetestNext(_t:Ref<T_>):Void

staticinlinetestNextEOFHandling(_t:Ref<T_>):Void

staticinlinetestNumbers(_t:Ref<T_>):Void

staticinlinetestPos(_t:Ref<T_>):Void

staticinlinetestPosition(_t:Ref<T_>):Void

staticinlinetestScan(_t:Ref<T_>):Void

staticinlinetestScanCustomIdent(_t:Ref<T_>):Void

staticinlinetestScanEOFHandling(_t:Ref<T_>):Void

staticinlinetestScanNext(_t:Ref<T_>):Void

staticinlinetestScanSelectedMask(_t:Ref<T_>):Void

staticinlinetestScanWhitespace(_t:Ref<T_>):Void

staticinlinetestScanZeroMode(_t:Ref<T_>):Void

staticinlinetokenString(_tok:GoInt32):GoString

TokenString returns a printable string for a token or Unicode character.