type go/ast.BasicLit
36 uses
go/ast (current package)
ast.go#L205: Tag *BasicLit // field tag; or nil
ast.go#L316: BasicLit struct {
ast.go#L498: func (x *BasicLit) Pos() token.Pos { return x.ValuePos }
ast.go#L537: func (x *BasicLit) End() token.Pos {
ast.go#L576: func (*BasicLit) exprNode() {}
ast.go#L912: Path *BasicLit // import path
import.go#L252: func updateBasicLitPos(lit *BasicLit, pos token.Pos) {
walk.go#L68: case *BadExpr, *Ident, *BasicLit:
go/doc
example.go#L729: func updateBasicLitPos(lit *ast.BasicLit, pos token.Pos) {
go/parser
parser.go#L727: var tag *ast.BasicLit
parser.go#L729: tag = &ast.BasicLit{ValuePos: p.pos, ValueEnd: p.stringEnd, Kind: p.tok, Value: p.lit}
parser.go#L1487: x := &ast.BasicLit{ValuePos: p.pos, ValueEnd: end, Kind: p.tok, Value: p.lit}
parser.go#L2543: Path: &ast.BasicLit{ValuePos: pos, ValueEnd: end, Kind: token.STRING, Value: path},
go/printer
nodes.go#L867: case *ast.BasicLit:
nodes.go#L1095: func normalizedNumber(lit *ast.BasicLit) *ast.BasicLit {
nodes.go#L1144: return &ast.BasicLit{ValuePos: lit.ValuePos, Kind: lit.Kind, Value: x}
nodes.go#L1639: func sanitizeImportPath(lit *ast.BasicLit) *ast.BasicLit {
nodes.go#L1679: return &ast.BasicLit{ValuePos: lit.ValuePos, Kind: token.STRING, Value: s}
printer.go#L957: case *ast.BasicLit:
go/types
expr.go#L296: case *ast.Ident, *ast.BasicLit, *ast.SelectorExpr:
expr.go#L1063: case *ast.BasicLit:
exprstring.go#L46: case *ast.BasicLit:
literals.go#L21: func (check *Checker) langCompat(lit *ast.BasicLit) {
literals.go#L48: func (check *Checker) basicLit(x *operand, e *ast.BasicLit) {
stmt.go#L497: Y := &ast.BasicLit{ValuePos: s.X.Pos(), Kind: token.INT, Value: "1"} // use x's position
struct.go#L211: func (check *Checker) tag(t *ast.BasicLit) string {
golang.org/x/tools/go/ast/inspector
typeof.go#L112: case *ast.BasicLit:
walk.go#L58: case *ast.BadExpr, *ast.Ident, *ast.BasicLit:
golang.org/x/tools/internal/typesinternal
fx.go#L20: case nil, *ast.Ident, *ast.BasicLit, *ast.BinaryExpr, *ast.ParenExpr,
zerovalue.go#L134: return &ast.BasicLit{Kind: token.INT, Value: "0"}, true
zerovalue.go#L136: return &ast.BasicLit{Kind: token.STRING, Value: `""`}, true
zerovalue.go#L142: return &ast.BasicLit{Kind: token.STRING, Value: `"invalid"`}, false
zerovalue.go#L152: return &ast.BasicLit{Kind: token.STRING, Value: `"invalid"`}, false
zerovalue.go#L231: Len: &ast.BasicLit{