package
0.0.0-20181101142754-a5f7082aabed
Repository: https://github.com/google/skylark.git
Documentation: pkg.go.dev
# Functions
End returns the end position of the expression.
MakePosition returns position with the specified components.
Parse parses the input data and returns the corresponding parse tree.
ParseExpr parses a Skylark expression.
Start returns the start position of the expression.
Walk traverses a syntax tree in depth-first order.
# Constants
&.
&=.
Keywords.
No description provided by the author
^.
^=.
:.
,.
No description provided by the author
No description provided by the author
.
No description provided by the author
No description provided by the author
No description provided by the author
=.
==.
1.23e45.
No description provided by the author
>=.
>.
>>.
>>=.
x.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
123.
No description provided by the author
{.
[.
<=.
No description provided by the author
(.
<.
<<.
<<=.
-.
-=.
!=.
No description provided by the author
No description provided by the author
synthesized by parser from NOT IN.
No description provided by the author
No description provided by the author
No description provided by the author
%.
%=.
|.
|=.
+.
+= (keep order consistent with PLUS..GTGT).
}.
].
retain comments in AST; see Node.Comments.
No description provided by the author
).
;.
/.
/=.
//.
//=.
*.
*=.
**.
"foo" or 'foo' or '''foo''' or r'foo' or r"foo".
~.
# Structs
An AssignStmt represents an assignment: x = 0 x, y = y, x x += 1.
A BinaryExpr represents a binary expression: X Op Y.
A BranchStmt changes the flow of control: break, continue, pass.
A CallExpr represents a function call expression: Fn(Args).
A Comment represents a single # comment.
Comments collects the comments associated with an expression.
A Comprehension represents a list or dict comprehension: [Body for ..
CondExpr represents the conditional: X if COND else ELSE.
A DefStmt represents a function definition.
A DictEntry represents a dictionary entry: Key: Value.
A DictExpr represents a dictionary literal: { List }.
A DotExpr represents a field or method selector: X.Name.
An Error describes the nature and position of a scanner or parser error.
An ExprStmt is an expression evaluated for side effects.
A File represents a Skylark file.
A ForClause represents a for clause in a list comprehension: for Vars in X.
A ForStmt represents a loop: for Vars in X: Body.
A Function represents the common parts of LambdaExpr and DefStmt.
An Ident represents an identifier.
An IfClause represents an if clause in a list comprehension: if Cond.
An IfStmt is a conditional: If Cond: True; else: False.
An IndexExpr represents an index expression: X[Y].
A LambdaExpr represents an inline function abstraction.
A ListExpr represents a list literal: [ List ].
A Literal represents a literal string or number.
A LoadStmt loads another module and binds names from it: load(Module, "x", y="foo").
A ParenExpr represents a parenthesized expression: (X).
A Position describes the location of a rune of input.
A ReturnStmt returns from a function.
A SliceExpr represents a slice or substring expression: X[Lo:Hi:Step].
A TupleExpr represents a tuple literal: (List).
A UnaryExpr represents a unary expression: Op X.