package
1.22.2
Repository: https://github.com/go-asm/go.git
Documentation: pkg.go.dev

# Functions

CommentMap collects all comments in the given src with comment text that matches the supplied regular expression rx and returns them as []Error lists in a map indexed by line number.
CommentsDo parses the given source and calls the provided handler for each comment or error.
EndPos returns the approximate end position of n in the source.
Fdump dumps the structure of the syntax tree rooted at n to w.
Fprint prints node x to w in the specified form.
Inspect traverses an AST in pre-order: it starts by calling f(root); root must not be nil.
MakePos returns a new Pos for the given PosBase, line and column.
NewFileBase returns a new PosBase for the given filename.
NewLineBase returns a new PosBase for a line directive "line filename:line:col" relative to pos, which is the position of the character immediately following the comment containing the line directive.
No description provided by the author
NewTrimmedFileBase is like NewFileBase, but allows specifying Trimmed.
Parse parses a single Go source file from src and returns the corresponding syntax tree.
ParseFile behaves like Parse but it reads the source from the named file.
StartPos returns the start position of n.
String is a convenience function that prints n in ShortForm and returns the printed string.
UnpackListExpr unpacks a *ListExpr into a []Expr.
Unparen returns e with any enclosing parentheses stripped.
Walk traverses an AST in pre-order: It starts by calling v.Visit(node); node must not be nil.

# Constants

No description provided by the author
+.
&.
&&.
&^.
No description provided by the author
for BranchStmt.
check correct use of labels, break, continue, and goto statements.
No description provided by the author
:.
No description provided by the author
/.
==.
No description provided by the author
TODO(gri) With the 'i' (imaginary) suffix now permitted on integer and floating-point numbers, having a single ImagLit does not represent the literal kind well anymore.
>=.
for CallStmt.
No description provided by the author
>.
TODO(gri) With the 'i' (imaginary) suffix now permitted on integer and floating-point numbers, having a single ImagLit does not represent the literal kind well anymore.
TODO(gri) With the 'i' (imaginary) suffix now permitted on integer and floating-point numbers, having a single ImagLit does not represent the literal kind well anymore.
No description provided by the author
<=.
use spaces instead of linebreaks where possible.
<.
*.
!=.
!.
|.
||.
PosMax is the largest line or column value that can be represented without loss.
<-.
No description provided by the author
%.
No description provided by the author
TODO(gri) With the 'i' (imaginary) suffix now permitted on integer and floating-point numbers, having a single ImagLit does not represent the literal kind well anymore.
No description provided by the author
<<.
like LineForm but print "…" for non-empty function or composite literal bodies.
>>.
TODO(gri) With the 'i' (imaginary) suffix now permitted on integer and floating-point numbers, having a single ImagLit does not represent the literal kind well anymore.
-.
~.
^.

# Structs

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
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
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
Error describes a syntax error.
No description provided by the author
No description provided by the author
package PkgName; DeclList[0], DeclList[1], ...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
All declarations belonging to the same group point to the same Group node.
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
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
A Pos represents an absolute (line, col) source position with a reference to position base for computing relative (to a file, or line directive) position information.
A PosBase represents the base for relative position information: At position pos, the relative position is filename:line:col.
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
No description provided by the author
No description provided by the author
No description provided by the author
A TypeAndValue records the type information, constant value if known, and various other flags associated with an expression.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
A Pragma value augments a package, import, const, func, type, or var declaration.
No description provided by the author
No description provided by the author
A Type represents a type of Go.
A Visitor's Visit method is invoked for each node encountered by Walk.

# Type aliases

No description provided by the author
TODO(gri) Consider renaming to CommentPos, CommentPlacement, etc.
An ErrorHandler is called for each error encountered reading a .go file.
Form controls print formatting.
No description provided by the author
Mode describes the parser mode.
No description provided by the author
A PragmaHandler is used to process //go: directives while scanning.
No description provided by the author