Scanners

Norg.ScannersModule

Provides the scanners for the tokenizer.

The role of a scanner is to recognize a sequence of characters and to produce a ScanResult.

source
Norg.Scanners.scanFunction
scan(pattern, input)

Scan the given input for the given pattern.

It will produce a Scanners.ScanResult.

If pattern is given, then try to fit the given patter at the start of input. If pattern is :

  • a ScanStrategy subtype : scan with the given strategy (e.g. Word or Whitespace)
  • a Kind : parse for the given kind.
  • an AbstractString : input must startswith pattern.
  • an AbstractArray : call scan on each element of pattern until one matches.
  • a Set{Char} : first character must be included in pattern.
source