v0.1.2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2015 License: MPL-2.0, MPL-2.0 Imports: 8 Imported by: 0




View Source
const BOOL = 57346
View Source
const COMMA = 57349
View Source
const COMMAEND = 57350
View Source
const EMINUS = 57362
View Source
const EPLUS = 57361
View Source
const EQUAL = 57352
View Source
const FLOAT = 57347
View Source
const IDENTIFIER = 57351
View Source
const LEFTBRACE = 57356
View Source
const LEFTBRACKET = 57358
View Source
const MINUS = 57355
View Source
const NEWLINE = 57353
View Source
const NUMBER = 57348
View Source
const PERIOD = 57360
View Source
const RIGHTBRACE = 57357
View Source
const RIGHTBRACKET = 57359
View Source
const STRING = 57354


This section is empty.


This section is empty.


type Object

type Object struct {
	Key   string
	Type  ValueType
	Value interface{}
	Next  *Object

Object represents any element of HCL: an object itself, a list, a literal, etc.

func Parse

func Parse(v string) (*Object, error)

Parse parses the given string and returns the result.

func (*Object) Elem

func (o *Object) Elem(expand bool) []*Object

Elem returns all the elements that are part of this object.

func (*Object) Get

func (o *Object) Get(k string, insensitive bool) *Object

Get gets all the objects that match the given key.

It returns the resulting objects as a single Object structure with the linked list populated.

func (*Object) GoString

func (o *Object) GoString() string

GoString is an implementation of the GoStringer interface.

func (*Object) Len

func (o *Object) Len() (i int)

Len returns the number of objects in this object structure.

type ObjectList

type ObjectList []*Object

ObjectList is a list of objects.

func (ObjectList) Flat

func (l ObjectList) Flat() []*Object

Flat returns a flattened list structure of the objects.

type ValueType

type ValueType byte

ValueType is an enum represnting the type of a value in a LiteralNode.

const (
	ValueTypeUnknown ValueType = iota

func (ValueType) String

func (i ValueType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL