package token

Import Path
	github.com/hashicorp/hcl/json/token (on go.dev)

Dependency Relation
	imports 3 packages, and imported by 2 packages

Involved Source Files position.go token.go
Package-Level Type Names (total 3, all are exported)
/* sort exporteds by: | */
Pos describes an arbitrary source position including the file, line, and column location. A Position is valid if the line number is > 0. // column number, starting at 1 (character count) // filename, if any // line number, starting at 1 // offset, starting at 0 After reports whether the position p is after u. Before reports whether the position p is before u. IsValid returns true if the position is valid. String returns a string in one of several forms: file:line:column valid position with file name line:column valid position without file name file invalid position with file name - invalid position without file name T : fmt.Stringer func Pos.After(u Pos) bool func Pos.Before(u Pos) bool
Token defines a single HCL token which can be obtained via the Scanner Pos Pos Text string Type Type HCLToken converts this token to an HCL token. The token type must be a literal type or this will panic. String returns the token's literal text. Note that this is only applicable for certain token types, such as token.IDENT, token.STRING, etc.. T : fmt.Stringer func github.com/hashicorp/hcl/json/scanner.(*Scanner).Scan() Token
Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language) IsIdentifier returns true for tokens corresponding to identifiers and basic type literals; it returns false otherwise. IsLiteral returns true for tokens corresponding to basic type literals; it returns false otherwise. IsOperator returns true for tokens corresponding to operators and delimiters; it returns false otherwise. String returns the string corresponding to the token tok. T : fmt.Stringer const BOOL const COLON const COMMA const EOF const FLOAT const ILLEGAL const LBRACE const LBRACK const NULL const NUMBER const PERIOD const RBRACE const RBRACK const STRING
Package-Level Variables (only one, which is unexported)
Package-Level Constants (total 20, in which 14 are exported)
const BOOL Type = 6 // true,false
const COLON Type = 16 // :
const COMMA Type = 14 // ,
const EOF Type = 1
const FLOAT Type = 5 // 123.45
Special tokens
const LBRACE Type = 13 // {
const LBRACK Type = 12 // [
const NULL Type = 8 // null
const NUMBER Type = 4 // 12345
const PERIOD Type = 15 // .
const RBRACE Type = 18 // }
const RBRACK Type = 17 // ]
const STRING Type = 7 // "abc"