pyre.parsing.SWScanner

Module Contents

class pyre.parsing.SWScanner.SWScanner

Bases: pyre.parsing.Scanner.Scanner

A scanner for languages that use leading whitespace to indicate the hierarchical structure of the content

pop
push
cdata
comment
pyre_dent = 0
pyre_blocks
margin
pyre_start(self)

Scanning has begun

pyre_finish(self)

Scanning has ended

pyre_newline(self, stream)

A fresh line has been retrieved from the input {stream}

pyre_indent(self, locator, column)

Indent to the given {column}

pyre_dedent(self, locator, column)

Dedent by as many open blocks as it takes to come back to {column}

pyre_cdata(self)

Scan forward from the current location and convert any text in all nested blocks into a {cdata} token. The lexeme of a {cdata} token is a list of strings with the leading indentation, all trivial lines, and all embedded comments removed.

pyre_trim(self, text)

Determine whether {text} contains any structurally relevant information