Copyright | (c) 2009 Bernie Pope |
---|---|
License | BSD-style |
Maintainer | bjpop@csse.unimelb.edu.au |
Stability | experimental |
Portability | ghc |
Safe Haskell | Safe |
Language | Haskell98 |
Representation of the Python abstract syntax tree (AST). The representation is a superset of versions 2.x and 3.x of Python. In many cases they are identical. The documentation in this module indicates where they are different.
All the data types have a (polymorphic) parameter which allows the AST to
be annotated by an arbitrary type (for example source locations). Specialised
instances of the types are provided for source spans. For example Module a
is
the type of modules, and ModuleSpan
is the type of modules annoted with source
span information.
Note: there are cases where the AST is more liberal than the formal grammar of the language. Therefore some care must be taken when constructing Python programs using the raw AST.
- class Annotated t where
- newtype Module annot = Module [Statement annot]
- type ModuleSpan = Module SrcSpan
- data Ident annot = Ident {
- ident_string :: !String
- ident_annot :: annot
- type IdentSpan = Ident SrcSpan
- type DottedName annot = [Ident annot]
- type DottedNameSpan = DottedName SrcSpan
- data Statement annot
- = Import {
- import_items :: [ImportItem annot]
- stmt_annot :: annot
- | FromImport {
- from_module :: ImportRelative annot
- from_items :: FromItems annot
- stmt_annot :: annot
- | While {
- while_cond :: Expr annot
- while_body :: Suite annot
- while_else :: Suite annot
- stmt_annot :: annot
- | For {
- for_targets :: [Expr annot]
- for_generator :: Expr annot
- for_body :: Suite annot
- for_else :: Suite annot
- stmt_annot :: annot
- | Fun {
- fun_name :: Ident annot
- fun_args :: [Parameter annot]
- fun_result_annotation :: Maybe (Expr annot)
- fun_body :: Suite annot
- stmt_annot :: annot
- | Class {
- class_name :: Ident annot
- class_args :: [Argument annot]
- class_body :: Suite annot
- stmt_annot :: annot
- | Conditional {
- cond_guards :: [(Expr annot, Suite annot)]
- cond_else :: Suite annot
- stmt_annot :: annot
- | Assign {
- assign_to :: [Expr annot]
- assign_expr :: Expr annot
- stmt_annot :: annot
- | AugmentedAssign {
- aug_assign_to :: Expr annot
- aug_assign_op :: AssignOp annot
- aug_assign_expr :: Expr annot
- stmt_annot :: annot
- | Decorated {
- decorated_decorators :: [Decorator annot]
- decorated_def :: Statement annot
- stmt_annot :: annot
- | Return {
- return_expr :: Maybe (Expr annot)
- stmt_annot :: annot
- | Try {
- try_body :: Suite annot
- try_excepts :: [Handler annot]
- try_else :: Suite annot
- try_finally :: Suite annot
- stmt_annot :: annot
- | Raise {
- raise_expr :: RaiseExpr annot
- stmt_annot :: annot
- | With {
- with_context :: [(Expr annot, Maybe (Expr annot))]
- with_body :: Suite annot
- stmt_annot :: annot
- | Pass {
- stmt_annot :: annot
- | Break {
- stmt_annot :: annot
- | Continue {
- stmt_annot :: annot
- | Delete {
- del_exprs :: [Expr annot]
- stmt_annot :: annot
- | StmtExpr {
- stmt_expr :: Expr annot
- stmt_annot :: annot
- | Global {
- global_vars :: [Ident annot]
- stmt_annot :: annot
- | NonLocal {
- nonLocal_vars :: [Ident annot]
- stmt_annot :: annot
- | Assert {
- assert_exprs :: [Expr annot]
- stmt_annot :: annot
- | Print {
- print_chevron :: Bool
- print_exprs :: [Expr annot]
- print_trailing_comma :: Bool
- stmt_annot :: annot
- | Exec {
- exec_expr :: Expr annot
- exec_globals_locals :: Maybe (Expr annot, Maybe (Expr annot))
- stmt_annot :: annot
- = Import {
- type StatementSpan = Statement SrcSpan
- type Suite annot = [Statement annot]
- type SuiteSpan = Suite SrcSpan
- data Parameter annot
- = Param {
- param_name :: Ident annot
- param_py_annotation :: Maybe (Expr annot)
- param_default :: Maybe (Expr annot)
- param_annot :: annot
- | VarArgsPos {
- param_name :: Ident annot
- param_py_annotation :: Maybe (Expr annot)
- param_annot :: annot
- | VarArgsKeyword {
- param_name :: Ident annot
- param_py_annotation :: Maybe (Expr annot)
- param_annot :: annot
- | EndPositional {
- param_annot :: annot
- | UnPackTuple {
- param_unpack_tuple :: ParamTuple annot
- param_default :: Maybe (Expr annot)
- param_annot :: annot
- = Param {
- type ParameterSpan = Parameter SrcSpan
- data ParamTuple annot
- = ParamTupleName {
- param_tuple_name :: Ident annot
- param_tuple_annot :: annot
- | ParamTuple {
- param_tuple :: [ParamTuple annot]
- param_tuple_annot :: annot
- = ParamTupleName {
- type ParamTupleSpan = ParamTuple SrcSpan
- data Decorator annot = Decorator {
- decorator_name :: DottedName annot
- decorator_args :: [Argument annot]
- decorator_annot :: annot
- type DecoratorSpan = Decorator SrcSpan
- data AssignOp annot
- = PlusAssign {
- assignOp_annot :: annot
- | MinusAssign {
- assignOp_annot :: annot
- | MultAssign {
- assignOp_annot :: annot
- | DivAssign {
- assignOp_annot :: annot
- | ModAssign {
- assignOp_annot :: annot
- | PowAssign {
- assignOp_annot :: annot
- | BinAndAssign {
- assignOp_annot :: annot
- | BinOrAssign {
- assignOp_annot :: annot
- | BinXorAssign {
- assignOp_annot :: annot
- | LeftShiftAssign {
- assignOp_annot :: annot
- | RightShiftAssign {
- assignOp_annot :: annot
- | FloorDivAssign {
- assignOp_annot :: annot
- = PlusAssign {
- type AssignOpSpan = AssignOp SrcSpan
- data Expr annot
- = Var {
- var_ident :: Ident annot
- expr_annot :: annot
- | Int {
- int_value :: Integer
- expr_literal :: String
- expr_annot :: annot
- | LongInt {
- int_value :: Integer
- expr_literal :: String
- expr_annot :: annot
- | Float {
- float_value :: Double
- expr_literal :: String
- expr_annot :: annot
- | Imaginary {
- imaginary_value :: Double
- expr_literal :: String
- expr_annot :: annot
- | Bool {
- bool_value :: Bool
- expr_annot :: annot
- | None {
- expr_annot :: annot
- | Ellipsis {
- expr_annot :: annot
- | ByteStrings {
- byte_string_strings :: [String]
- expr_annot :: annot
- | Strings {
- strings_strings :: [String]
- expr_annot :: annot
- | UnicodeStrings {
- unicodestrings_strings :: [String]
- expr_annot :: annot
- | Call {
- call_fun :: Expr annot
- call_args :: [Argument annot]
- expr_annot :: annot
- | Subscript {
- subscriptee :: Expr annot
- subscript_expr :: Expr annot
- expr_annot :: annot
- | SlicedExpr {
- slicee :: Expr annot
- slices :: [Slice annot]
- expr_annot :: annot
- | CondExpr {
- ce_true_branch :: Expr annot
- ce_condition :: Expr annot
- ce_false_branch :: Expr annot
- expr_annot :: annot
- | BinaryOp {
- operator :: Op annot
- left_op_arg :: Expr annot
- right_op_arg :: Expr annot
- expr_annot :: annot
- | UnaryOp {
- operator :: Op annot
- op_arg :: Expr annot
- expr_annot :: annot
- | Dot {
- dot_expr :: Expr annot
- dot_attribute :: Ident annot
- expr_annot :: annot
- | Lambda {
- lambda_args :: [Parameter annot]
- lambda_body :: Expr annot
- expr_annot :: annot
- | Tuple {
- tuple_exprs :: [Expr annot]
- expr_annot :: annot
- | Yield {
- yield_arg :: Maybe (YieldArg annot)
- expr_annot :: annot
- | Generator {
- gen_comprehension :: Comprehension annot
- expr_annot :: annot
- | ListComp {
- list_comprehension :: Comprehension annot
- expr_annot :: annot
- | List {
- list_exprs :: [Expr annot]
- expr_annot :: annot
- | Dictionary {
- dict_mappings :: [DictMappingPair annot]
- expr_annot :: annot
- | DictComp {
- dict_comprehension :: Comprehension annot
- expr_annot :: annot
- | Set {
- set_exprs :: [Expr annot]
- expr_annot :: annot
- | SetComp {
- set_comprehension :: Comprehension annot
- expr_annot :: annot
- | Starred {
- starred_expr :: Expr annot
- expr_annot :: annot
- | Paren {
- paren_expr :: Expr annot
- expr_annot :: annot
- | StringConversion {
- backquoted_expr :: Expr annot
- expr_anot :: annot
- = Var {
- type ExprSpan = Expr SrcSpan
- data Op annot
- = And {
- op_annot :: annot
- | Or {
- op_annot :: annot
- | Not {
- op_annot :: annot
- | Exponent {
- op_annot :: annot
- | LessThan {
- op_annot :: annot
- | GreaterThan {
- op_annot :: annot
- | Equality {
- op_annot :: annot
- | GreaterThanEquals {
- op_annot :: annot
- | LessThanEquals {
- op_annot :: annot
- | NotEquals {
- op_annot :: annot
- | NotEqualsV2 {
- op_annot :: annot
- | In {
- op_annot :: annot
- | Is {
- op_annot :: annot
- | IsNot {
- op_annot :: annot
- | NotIn {
- op_annot :: annot
- | BinaryOr {
- op_annot :: annot
- | Xor {
- op_annot :: annot
- | BinaryAnd {
- op_annot :: annot
- | ShiftLeft {
- op_annot :: annot
- | ShiftRight {
- op_annot :: annot
- | Multiply {
- op_annot :: annot
- | Plus {
- op_annot :: annot
- | Minus {
- op_annot :: annot
- | Divide {
- op_annot :: annot
- | FloorDivide {
- op_annot :: annot
- | Invert {
- op_annot :: annot
- | Modulo {
- op_annot :: annot
- = And {
- type OpSpan = Op SrcSpan
- data Argument annot
- = ArgExpr { }
- | ArgVarArgsPos { }
- | ArgVarArgsKeyword { }
- | ArgKeyword {
- arg_keyword :: Ident annot
- arg_expr :: Expr annot
- arg_annot :: annot
- type ArgumentSpan = Argument SrcSpan
- data Slice annot
- = SliceProper {
- slice_lower :: Maybe (Expr annot)
- slice_upper :: Maybe (Expr annot)
- slice_stride :: Maybe (Maybe (Expr annot))
- slice_annot :: annot
- | SliceExpr {
- slice_expr :: Expr annot
- slice_annot :: annot
- | SliceEllipsis {
- slice_annot :: annot
- = SliceProper {
- type SliceSpan = Slice SrcSpan
- data DictMappingPair annot = DictMappingPair (Expr annot) (Expr annot)
- type DictMappingPairSpan = DictMappingPair SrcSpan
- data YieldArg annot
- type YieldArgSpan = YieldArg SrcSpan
- data ImportItem annot = ImportItem {
- import_item_name :: DottedName annot
- import_as_name :: Maybe (Ident annot)
- import_item_annot :: annot
- type ImportItemSpan = ImportItem SrcSpan
- data FromItem annot = FromItem {
- from_item_name :: Ident annot
- from_as_name :: Maybe (Ident annot)
- from_item_annot :: annot
- type FromItemSpan = FromItem SrcSpan
- data FromItems annot
- = ImportEverything {
- from_items_annot :: annot
- | FromItems {
- from_items_items :: [FromItem annot]
- from_items_annot :: annot
- = ImportEverything {
- type FromItemsSpan = FromItems SrcSpan
- data ImportRelative annot = ImportRelative {
- import_relative_dots :: Int
- import_relative_module :: Maybe (DottedName annot)
- import_relative_annot :: annot
- type ImportRelativeSpan = ImportRelative SrcSpan
- data Handler annot = Handler {
- handler_clause :: ExceptClause annot
- handler_suite :: Suite annot
- handler_annot :: annot
- type HandlerSpan = Handler SrcSpan
- data ExceptClause annot = ExceptClause {
- except_clause :: Maybe (Expr annot, Maybe (Expr annot))
- except_clause_annot :: annot
- type ExceptClauseSpan = ExceptClause SrcSpan
- data RaiseExpr annot
- type RaiseExprSpan = RaiseExpr SrcSpan
- data Comprehension annot = Comprehension {
- comprehension_expr :: ComprehensionExpr annot
- comprehension_for :: CompFor annot
- comprehension_annot :: annot
- type ComprehensionSpan = Comprehension SrcSpan
- data ComprehensionExpr annot
- = ComprehensionExpr (Expr annot)
- | ComprehensionDict (DictMappingPair annot)
- type ComprehensionExprSpan = ComprehensionExpr SrcSpan
- data CompFor annot = CompFor {
- comp_for_exprs :: [Expr annot]
- comp_in_expr :: Expr annot
- comp_for_iter :: Maybe (CompIter annot)
- comp_for_annot :: annot
- type CompForSpan = CompFor SrcSpan
- data CompIf annot = CompIf {
- comp_if :: Expr annot
- comp_if_iter :: Maybe (CompIter annot)
- comp_if_annot :: annot
- type CompIfSpan = CompIf SrcSpan
- data CompIter annot
- = IterFor {
- comp_iter_for :: CompFor annot
- comp_iter_annot :: annot
- | IterIf {
- comp_iter_if :: CompIf annot
- comp_iter_annot :: annot
- = IterFor {
- type CompIterSpan = CompIter SrcSpan
Annotation projection
class Annotated t where Source #
Convenient access to annotations in annotated types.
Modules
A module (Python source file).
type ModuleSpan = Module SrcSpan Source #
Identifiers and dotted names
Identifier.
Ident | |
|
type DottedName annot = [Ident annot] Source #
A compound name constructed with the dot operator.
type DottedNameSpan = DottedName SrcSpan Source #
Statements, suites, parameters, decorators and assignment operators
Statements.
- Simple statements:
- Version 2.6 http://www.python.org/doc/2.6/reference/simple_stmts.html
- Version 3.1 http://www.python.org/doc/3.1/reference/simple_stmts.html
- Compound statements:
- Version 2.6 http://www.python.org/doc/2.6/reference/compound_stmts.html
- Version 3.1 http://www.python.org/doc/3.1/reference/compound_stmts.html
Import | Import statement. |
| |
FromImport | From ... import statement. |
| |
While | While loop. |
| |
For | For loop. |
| |
Fun | Function definition. |
| |
Class | Class definition. |
| |
Conditional | Conditional statement (if-elif-else). |
| |
Assign | Assignment statement. |
| |
AugmentedAssign | Augmented assignment statement. |
| |
Decorated | Decorated definition of a function or class. |
| |
Return | Return statement (may only occur syntactically nested in a function definition). |
| |
Try | Try statement (exception handling). |
| |
Raise | Raise statement (exception throwing). |
| |
With | With statement (context management). |
| |
Pass | Pass statement (null operation). |
| |
Break | Break statement (may only occur syntactically nested in a for or while loop, but not nested in a function or class definition within that loop). |
| |
Continue | Continue statement (may only occur syntactically nested in a for or while loop, but not nested in a function or class definition or finally clause within that loop). |
| |
Delete | Del statement (delete). |
| |
StmtExpr | Expression statement. |
| |
Global | Global declaration. |
| |
NonLocal | Nonlocal declaration. Version 3.x only. |
| |
Assert | Assertion. |
| |
Print statement. Version 2 only. | |
| |
Exec | Exec statement. Version 2 only. |
|
type StatementSpan = Statement SrcSpan Source #
type Suite annot = [Statement annot] Source #
A block of statements. A suite is a group of statements controlled by a clause, for example, the body of a loop.
Formal parameter of function definitions and lambda expressions.
- Version 2.6:
- http://www.python.org/doc/2.6/reference/compound_stmts.html#function-definitions
- http://www.python.org/doc/2.6/reference/expressions.html#calls
- Version 3.1:
- http://www.python.org/doc/3.1/reference/compound_stmts.html#function-definitions
- http://www.python.org/doc/3.1/reference/expressions.html#calls
Param | Ordinary named parameter. |
| |
VarArgsPos | Excess positional parameter (single asterisk before its name in the concrete syntax). |
| |
VarArgsKeyword | Excess keyword parameter (double asterisk before its name in the concrete syntax). |
| |
EndPositional | Marker for the end of positional parameters (not a parameter itself). |
| |
UnPackTuple | Tuple unpack. Version 2 only. |
|
type ParameterSpan = Parameter SrcSpan Source #
data ParamTuple annot Source #
Tuple unpack parameter. Version 2 only.
ParamTupleName | A variable name. |
| |
ParamTuple | A (possibly nested) tuple parameter. |
|
Functor ParamTuple Source # | |
Span ParamTupleSpan Source # | |
Annotated ParamTuple Source # | |
Eq annot => Eq (ParamTuple annot) Source # | |
Data annot => Data (ParamTuple annot) Source # | |
Ord annot => Ord (ParamTuple annot) Source # | |
Show annot => Show (ParamTuple annot) Source # | |
type ParamTupleSpan = ParamTuple SrcSpan Source #
Decorator.
Decorator | |
|
type DecoratorSpan = Decorator SrcSpan Source #
Augmented assignment operators.
PlusAssign | '+=' |
| |
MinusAssign | '-=' |
| |
MultAssign | '*=' |
| |
DivAssign | '/=' |
| |
ModAssign | '%=' |
| |
PowAssign | '*=' |
| |
BinAndAssign | '&=' |
| |
BinOrAssign | '|=' |
| |
BinXorAssign | '^=' |
| |
LeftShiftAssign | '<<=' |
| |
RightShiftAssign | '>>=' |
| |
FloorDivAssign | '//=' |
|
type AssignOpSpan = AssignOp SrcSpan Source #
Expressions, operators, arguments and slices
Expressions.
Var | Variable. |
| |
Int | Literal integer. |
| |
LongInt | Long literal integer. Version 2 only. |
| |
Float | Literal floating point number. |
| |
Imaginary | Literal imaginary number. |
| |
Bool | Literal boolean. |
| |
None | Literal 'None' value. |
| |
Ellipsis | Ellipsis '...'. |
| |
ByteStrings | Literal byte string. |
| |
Strings | Literal strings (to be concatentated together). |
| |
UnicodeStrings | Unicode literal strings (to be concatentated together). Version 2 only. |
| |
Call | Function call. |
| |
Subscript | Subscription, for example 'x [y]'. |
| |
SlicedExpr | Slicing, for example 'w [x:y:z]'. |
| |
CondExpr | Conditional expresison. |
| |
BinaryOp | Binary operator application. |
| |
UnaryOp | Unary operator application. |
| |
Dot | |
| |
Lambda | Anonymous function definition (lambda). |
| |
Tuple | Tuple. Can be empty. |
| |
Yield | Generator yield. |
| |
Generator | Generator. |
| |
ListComp | List comprehension. |
| |
List | List. |
| |
Dictionary | Dictionary. |
| |
DictComp | Dictionary comprehension. Version 3 only. |
| |
Set | Set. |
| |
SetComp | Set comprehension. Version 3 only. |
| |
Starred | Starred expression. Version 3 only. |
| |
Paren | Parenthesised expression. |
| |
StringConversion | String conversion (backquoted expression). Version 2 only. |
|
Operators.
And | 'and' |
| |
Or | 'or' |
| |
Not | 'not' |
| |
Exponent | '**' |
| |
LessThan | '<' |
| |
GreaterThan | '>' |
| |
Equality | '==' |
| |
GreaterThanEquals | '>=' |
| |
LessThanEquals | '<=' |
| |
NotEquals | '!=' |
| |
NotEqualsV2 | '<>'. Version 2 only. |
| |
In | 'in' |
| |
Is | 'is' |
| |
IsNot | 'is not' |
| |
NotIn | 'not in' |
| |
BinaryOr | '|' |
| |
Xor | '^' |
| |
BinaryAnd | '&' |
| |
ShiftLeft | '<<' |
| |
ShiftRight | '>>' |
| |
Multiply | '*' |
| |
Plus | '+' |
| |
Minus | '-' |
| |
Divide | '/' |
| |
FloorDivide | '//' |
| |
Invert | '~' (bitwise inversion of its integer argument) |
| |
Modulo | '%' |
|
Arguments to function calls, class declarations and decorators.
ArgExpr | Ordinary argument expression. |
ArgVarArgsPos | Excess positional argument. |
ArgVarArgsKeyword | Excess keyword argument. |
ArgKeyword | Keyword argument. |
|
type ArgumentSpan = Argument SrcSpan Source #
Slice compenent.
SliceProper | |
| |
SliceExpr | |
| |
SliceEllipsis | |
|
data DictMappingPair annot Source #
DictMappingPair (Expr annot) (Expr annot) |
Functor DictMappingPair Source # | |
Span DictMappingPairSpan Source # | |
Eq annot => Eq (DictMappingPair annot) Source # | |
Data annot => Data (DictMappingPair annot) Source # | |
Ord annot => Ord (DictMappingPair annot) Source # | |
Show annot => Show (DictMappingPair annot) Source # | |
type YieldArgSpan = YieldArg SrcSpan Source #
Imports
data ImportItem annot Source #
An entity imported using the 'import' keyword.
ImportItem | |
|
Functor ImportItem Source # | |
Span ImportItemSpan Source # | |
Annotated ImportItem Source # | |
Eq annot => Eq (ImportItem annot) Source # | |
Data annot => Data (ImportItem annot) Source # | |
Ord annot => Ord (ImportItem annot) Source # | |
Show annot => Show (ImportItem annot) Source # | |
type ImportItemSpan = ImportItem SrcSpan Source #
An entity imported using the 'from ... import' construct.
FromItem | |
|
type FromItemSpan = FromItem SrcSpan Source #
Items imported using the 'from ... import' construct.
ImportEverything | Import everything exported from the module. |
| |
FromItems | Import a specific list of items from the module. |
|
type FromItemsSpan = FromItems SrcSpan Source #
data ImportRelative annot Source #
A reference to the module to import from using the 'from ... import' construct.
ImportRelative | |
|
Functor ImportRelative Source # | |
Span ImportRelativeSpan Source # | |
Annotated ImportRelative Source # | |
Eq annot => Eq (ImportRelative annot) Source # | |
Data annot => Data (ImportRelative annot) Source # | |
Ord annot => Ord (ImportRelative annot) Source # | |
Show annot => Show (ImportRelative annot) Source # | |
Exceptions
Exception handler.
Handler | |
|
type HandlerSpan = Handler SrcSpan Source #
data ExceptClause annot Source #
Exception clause.
ExceptClause | |
|
Functor ExceptClause Source # | |
Span ExceptClauseSpan Source # | |
Annotated ExceptClause Source # | |
Eq annot => Eq (ExceptClause annot) Source # | |
Data annot => Data (ExceptClause annot) Source # | |
Ord annot => Ord (ExceptClause annot) Source # | |
Show annot => Show (ExceptClause annot) Source # | |
type ExceptClauseSpan = ExceptClause SrcSpan Source #
The argument for a raise
statement.
type RaiseExprSpan = RaiseExpr SrcSpan Source #
Comprehensions
data Comprehension annot Source #
Comprehension. In version 3.x this can be used for lists, sets, dictionaries and generators. data Comprehension e annot
Comprehension | |
|
Functor Comprehension Source # | |
Span ComprehensionSpan Source # | |
Annotated Comprehension Source # | |
Eq annot => Eq (Comprehension annot) Source # | |
Data annot => Data (Comprehension annot) Source # | |
Ord annot => Ord (Comprehension annot) Source # | |
Show annot => Show (Comprehension annot) Source # | |
type ComprehensionSpan = Comprehension SrcSpan Source #
data ComprehensionExpr annot Source #
ComprehensionExpr (Expr annot) | |
ComprehensionDict (DictMappingPair annot) |
Functor ComprehensionExpr Source # | |
Span ComprehensionExprSpan Source # | |
Eq annot => Eq (ComprehensionExpr annot) Source # | |
Data annot => Data (ComprehensionExpr annot) Source # | |
Ord annot => Ord (ComprehensionExpr annot) Source # | |
Show annot => Show (ComprehensionExpr annot) Source # | |
Comprehension 'for' component.
CompFor | |
|
type CompForSpan = CompFor SrcSpan Source #
Comprehension guard.
CompIf | |
|
type CompIfSpan = CompIf SrcSpan Source #
Comprehension iterator (either a 'for' or an 'if').
IterFor | |
| |
IterIf | |
|
type CompIterSpan = CompIter SrcSpan Source #