2014-08-01 01:44:21 +00:00
|
|
|
package hcl
|
|
|
|
|
|
|
|
type ValueType byte
|
|
|
|
|
|
|
|
const (
|
|
|
|
ValueTypeUnknown ValueType = iota
|
|
|
|
ValueTypeInt
|
|
|
|
ValueTypeString
|
|
|
|
)
|
|
|
|
|
|
|
|
type Node interface{}
|
|
|
|
|
|
|
|
type ObjectNode struct {
|
2014-08-01 15:14:57 +00:00
|
|
|
Key string
|
|
|
|
Elem []Node
|
2014-08-01 01:44:21 +00:00
|
|
|
}
|
|
|
|
|
2014-08-01 15:14:57 +00:00
|
|
|
type AssignmentNode struct {
|
|
|
|
Key string
|
|
|
|
Value Node
|
|
|
|
}
|
|
|
|
|
|
|
|
type ListNode struct {
|
|
|
|
Elem []Node
|
|
|
|
}
|
|
|
|
|
|
|
|
type LiteralNode struct {
|
2014-08-01 01:44:21 +00:00
|
|
|
Type ValueType
|
|
|
|
Value interface{}
|
|
|
|
}
|