code: func (t Token) Value() interface{} {
  	switch t.Type {
  	case BOOL:
  		if t.Text == "true" {
  			return true
  		} else if t.Text == "false" {
  			return false
  		}
  
  		panic("unknown bool value: " + t.Text)
  	case FLOAT:
  		v, err := strconv.ParseFloat(t.Text, 64)
  		if err != nil {
  			panic(err)
  		}
  
  		return float64(v)
  	case NUMBER:
  		v, err := strconv.ParseInt(t.Text, 0, 64)
  		if err != nil {
  			panic(err)
  		}
  
  		return int64(v)
  	case IDENT:
  		return t.Text
  	case HEREDOC:
  		return unindentHeredoc(t.Text)
  	case STRING:
  		// Determine the Unquote method to use. If it came from JSON,
  		// then we need to use the built-in unquote since we have to
  		// escape interpolations there.
  		f := hclstrconv.Unquote
  		if t.JSON {
  			f = strconv.Unquote
  		}
  
  		// This case occurs if json null is used
  		if t.Text == "" {
  			return ""
  		}
  
  		v, err := f(t.Text)
  		if err != nil {
  			panic(fmt.Sprintf("unquote %s err: %s", t.Text, err))
  		}
  
  		return v
  	default:
  		panic(fmt.Sprintf("unimplemented Value for type: %s", t.Type))
  	}
  }
docs: // Value returns the properly typed value for this token. The type of
  // the returned interface{} is guaranteed based on the Type field.
  //
  // This can only be called for literal types. If it is called for any other
  // type, this will panic.