Browse Source

add comments to value.go

pull/16/head
Brett Langdon 11 years ago
parent
commit
2dd6060c65
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      value.go

+ 14
- 2
value.go View File

@ -1,20 +1,31 @@
package forge package forge
// ValueType is an int type for representing the types of values forge can handle
type ValueType int type ValueType int
const ( const (
// UNKNOWN ValueType
UNKNOWN ValueType = iota UNKNOWN ValueType = iota
// Primative values
primativesStart
// BOOLEAN ValueType
BOOLEAN BOOLEAN
// FLOAT ValueType
FLOAT FLOAT
// INTEGER ValueType
INTEGER INTEGER
// NULL ValueType
NULL NULL
// STRING ValueType
STRING STRING
primativesDnd
// Complex values
complexStart
// REFERENCE ValueType
REFERENCE REFERENCE
// SECTION ValueType
SECTION SECTION
complexEnd
) )
var valueTypes = [...]string{ var valueTypes = [...]string{
@ -41,6 +52,7 @@ func (valueType ValueType) String() string {
return str return str
} }
// Value is the base interface for Primative and Section data types
type Value interface { type Value interface {
GetType() ValueType GetType() ValueType
GetValue() interface{} GetValue() interface{}


Loading…
Cancel
Save