|
| Language.Python.Common.SrcLocation | | Portability | ghc | | Stability | experimental | | Maintainer | bjpop@csse.unimelb.edu.au |
|
|
|
|
|
| Description |
| Source location information for the Python lexer and parser. This module
provides single-point locations and spans, and conversions between them.
|
|
| Synopsis |
|
|
|
|
| Construction
|
|
|
| A location for a syntactic entity from the source code.
The location is specified by its filename, and starting row
and column.
| | Constructors | | Instances | |
|
|
|
| Source location spanning a contiguous section of a file.
| | Constructors | | SpanCoLinear | A span which starts and ends on the same line.
| | span_filename :: !String | | | span_row :: !Int | | | span_start_column :: !Int | | | span_end_column :: !Int | |
| | SpanMultiLine | A span which starts and ends on different lines.
| | span_filename :: !String | | | span_start_row :: !Int | | | span_start_column :: !Int | | | span_end_row :: !Int | | | span_end_column :: !Int | |
| | SpanPoint | A span which is actually just one point in the file.
| | | SpanEmpty | No span information.
|
| Instances | |
|
|
|
| Types which have a span.
| | | Methods | | | Instances | |
|
|
|
| Create a new span which encloses two spanned things.
|
|
|
| Make a span from two locations. Assumption: either the
arguments are the same, or the left one preceeds the right one.
|
|
|
| Combines two SrcSpan into one that spans at least all the characters
within both spans. Assumes the file part is the same in both inputs
|
|
|
| Construct the initial source location for a file.
|
|
|
| Make a point span from the start of a span
|
|
| Modification
|
|
|
| Increment the column of a location.
|
|
|
| Decrement the column of a location, only if they are on the same row.
|
|
|
| Increment the line number (row) of a location by one.
|
|
|
| Increment the column of a location by one tab stop.
|
|
|
| Get the column of the end of a span.
|
|
| Projection of components of a span
|
|
|
| Get the row of the end of a span.
|
|
|
| Get the column of the start of a span.
|
|
|
| Get the row of the start of a span.
|
|
| Produced by Haddock version 2.4.2 |