Documentation
¶
Overview ¶
object.go
series.go
Index ¶
- Variables
- func ArrayFloat32FromSeries(block TSeries) []float32
- func LeftPad(s string, padStr string, padCount int) string
- func RyeToRaw(res Object) any
- func SetValue(ps *ProgramState, word string, val Object)
- type Argword
- type Block
- type Builtin
- type BuiltinFunction
- type CPath
- type Comma
- type Converter
- type Date
- type Decimal
- type Dict
- type EXword
- type Email
- type EnvR2
- type Error
- type Function
- type Gen
- type Genword
- type Getword
- type Idxs
- type Integer
- type Kind
- type Kindword
- type LSetword
- type List
- type Native
- type Object
- type Opword
- type Pipeword
- type ProgramState
- type RyeCtx
- func (e RyeCtx) Copy() *RyeCtx
- func (e *RyeCtx) Get(word int) (Object, bool)
- func (e *RyeCtx) Get2(word int) (Object, bool, *RyeCtx)
- func (i RyeCtx) GetKind() int
- func (e RyeCtx) GetWords(idxs Idxs) Block
- func (i RyeCtx) Inspect(e Idxs) string
- func (e RyeCtx) Preview(idxs Idxs, filter string) string
- func (e RyeCtx) Probe(idxs Idxs) string
- func (e *RyeCtx) Set(word int, val Object) Object
- func (i RyeCtx) Trace(msg string)
- func (i RyeCtx) Type() Type
- type Setword
- type SprNode
- type Spreadsheet
- func (s *Spreadsheet) AddRow(vals SpreadsheetRow)
- func (s Spreadsheet) Column(name string) Object
- func (s Spreadsheet) Columns(ps *ProgramState, names []string) Object
- func (s Spreadsheet) GetColumns() List
- func (s Spreadsheet) GetKind() int
- func (s Spreadsheet) GetRow(ps *ProgramState, index int) Object
- func (s Spreadsheet) GetRowNew(index int) Object
- func (s Spreadsheet) GetRowValue(column string, rrow SpreadsheetRow) (any, error)
- func (s *Spreadsheet) GetRows() []SpreadsheetRow
- func (s Spreadsheet) Inspect(e Idxs) string
- func (s Spreadsheet) NRows() int
- func (s Spreadsheet) Probe(e Idxs) string
- func (s *Spreadsheet) SetCols(vals []string)
- func (s Spreadsheet) Sum(name string) Object
- func (s Spreadsheet) Sum_Just(name string) (float64, error)
- func (s Spreadsheet) ToHtml() string
- func (s Spreadsheet) ToTxt() string
- func (s Spreadsheet) Trace(msg string)
- func (s Spreadsheet) Type() Type
- type SpreadsheetRow
- type String
- type TSeries
- func (ser *TSeries) Append(obj Object) *TSeries
- func (ser *TSeries) AppendMul(objs []Object) *TSeries
- func (ser TSeries) AtLast() bool
- func (ser TSeries) Ended() bool
- func (ser TSeries) Get(n int) Object
- func (ser *TSeries) GetAll() []Object
- func (ser *TSeries) GetPos() int
- func (ser TSeries) Len() int
- func (ser *TSeries) Next()
- func (ser TSeries) PGet(n int) *Object
- func (ser TSeries) Peek() Object
- func (ser *TSeries) Pop() Object
- func (ser TSeries) Pos() int
- func (ser TSeries) Probe(idxs Idxs) string
- func (ser *TSeries) Put(obj Object)
- func (ser *TSeries) Reset()
- func (ser *TSeries) RmLast() *TSeries
- func (ser *TSeries) SetPos(pos int)
- type Tagword
- type Time
- type Type
- type Uri
- type Vector
- type Void
- type Word
- type Xword
Constants ¶
This section is empty.
Variables ¶
var NativeTypes = [...]string{
"Block",
"Integer",
"Word",
"Setword",
"Opword",
"Pipeword",
"Builtin",
"Function",
"Error",
"Comma",
"Void",
"String",
"Tagword",
"Genword",
"Getword",
"Argword",
"Native",
"Uri",
"LSetword",
"Ctx",
"Dict",
"List",
"Date",
"CPath",
"Xword",
"EXword",
"Spreadsheet",
"Email",
"Kind",
"Kindword",
"Converter",
"Time",
"SpreadsheetRowType",
"Decimal",
"Vector",
}
Functions ¶
func ArrayFloat32FromSeries ¶
func SetValue ¶
func SetValue(ps *ProgramState, word string, val Object)
Types ¶
type Argword ¶
func NewArgword ¶
type Block ¶
Integer represents an integer.
type Builtin ¶
type Builtin struct {
Fn BuiltinFunction
Argsn int
Cur0 Object
Cur1 Object
Cur2 Object
Cur3 Object
Cur4 Object
AcceptFailure bool
Pure bool
Doc string
}
Builtin represents a builtin function.
func NewBuiltin ¶
type BuiltinFunction ¶
type BuiltinFunction func(ps *ProgramState, arg0 Object, arg1 Object, arg2 Object, arg3 Object, arg4 Object) Object
BuiltinFunction represents a function signature of builtin functions. ///type BuiltinFunction func(ps *ProgramState, args ...Object) Object
type Comma ¶
type Comma struct{}
Integer represents an integer.
type Converter ¶
type Decimal ¶
type Decimal struct {
Value float64 `bson:"value"`
}
Decimal
func NewDecimal ¶
type Dict ¶
String represents an string.
func NewDictFromSeries ¶
type EXword ¶
type EXword struct {
Index int
}
Integer represents an integer.
type Email ¶
type Email struct {
Address string
}
type Error ¶
type Error struct {
Status int
Message string
Parent *Error
Values map[string]Object
CodeContext *RyeCtx
CodeBlock TSeries
}
Integer represents an integer.
type Function ¶
Integer represents an integer.
type Genword ¶
type Genword struct {
Index int
}
Integer represents an integer.
func NewGenword ¶
type Getword ¶
type Getword struct {
Index int
}
Integer represents an integer.
func NewGetword ¶
type Idxs ¶
type Idxs struct {
// contains filtered or unexported fields
}
func (Idxs) GetWordCount ¶
type Integer ¶
type Integer struct {
Value int64
}
Integer represents an integer.
func NewInteger ¶
type Kind ¶
func (Kind) HasConverter ¶
func (Kind) SetConverter ¶
type Kindword ¶
type Kindword struct {
Index int
}
Integer represents an integer.
func NewKindword ¶
type LSetword ¶
type LSetword struct {
Index int
}
Integer represents an integer.
func NewLSetword ¶
type List ¶
func NewListFromSeries ¶
type Native ¶
String represents an string.
type Object ¶
type Object interface {
Type() Type
Inspect(e Idxs) string
Probe(e Idxs) string
Trace(msg string)
GetKind() int
}
func ToRyeValue ¶
type Opword ¶
Integer represents an integer.
type Pipeword ¶
Integer represents an integer.
func NewPipeword ¶
type ProgramState ¶
type ProgramState struct {
Ser TSeries // current block of code
Res Object // result of expression
Ctx *RyeCtx // Env object ()
PCtx *RyeCtx // Env object () -- pure countext
Idx *Idxs // Idx object (index of words)
Args []int // names of current arguments (indexes of names)
Gen *Gen // map[int]map[int]Object // list of Generic kinds / code
Inj Object // Injected first value in a block evaluation
Injnow bool
ReturnFlag bool
ErrorFlag bool
FailureFlag bool
ForcedResult Object
SkipFlag bool
InErrHandler bool
}
func AddToProgramState ¶
func AddToProgramState(ps *ProgramState, ser TSeries, idx *Idxs) *ProgramState
func NewProgramState ¶
func NewProgramState(ser TSeries, idx *Idxs) *ProgramState
type RyeCtx ¶
type RyeCtx struct {
Parent *RyeCtx
Kind Word
Doc string
// contains filtered or unexported fields
}
type Setword ¶
type Setword struct {
Index int
}
Integer represents an integer.
func NewSetword ¶
type Spreadsheet ¶
type Spreadsheet struct {
Cols []string
Rows []SpreadsheetRow
Kind Word
Indexes map[string]map[any][]int
}
func NewSpreadsheet ¶
func NewSpreadsheet(cols []string) *Spreadsheet
func (*Spreadsheet) AddRow ¶
func (s *Spreadsheet) AddRow(vals SpreadsheetRow)
Inspect returns a string representation of the Integer.
func (Spreadsheet) Column ¶
func (s Spreadsheet) Column(name string) Object
func (Spreadsheet) Columns ¶
func (s Spreadsheet) Columns(ps *ProgramState, names []string) Object
func (Spreadsheet) GetColumns ¶
func (s Spreadsheet) GetColumns() List
func (Spreadsheet) GetKind ¶
func (s Spreadsheet) GetKind() int
func (Spreadsheet) GetRow ¶
func (s Spreadsheet) GetRow(ps *ProgramState, index int) Object
func (Spreadsheet) GetRowNew ¶
func (s Spreadsheet) GetRowNew(index int) Object
func (Spreadsheet) GetRowValue ¶
func (s Spreadsheet) GetRowValue(column string, rrow SpreadsheetRow) (any, error)
func (*Spreadsheet) GetRows ¶
func (s *Spreadsheet) GetRows() []SpreadsheetRow
func (Spreadsheet) NRows ¶
func (s Spreadsheet) NRows() int
func (Spreadsheet) Probe ¶
func (s Spreadsheet) Probe(e Idxs) string
Inspect returns a string representation of the Integer.
func (*Spreadsheet) SetCols ¶
func (s *Spreadsheet) SetCols(vals []string)
Inspect returns a string representation of the Integer.
func (Spreadsheet) Sum ¶
func (s Spreadsheet) Sum(name string) Object
func (Spreadsheet) ToHtml ¶
func (s Spreadsheet) ToHtml() string
Inspect returns a string representation of the Integer.
func (Spreadsheet) ToTxt ¶
func (s Spreadsheet) ToTxt() string
Inspect returns a string representation of the Integer.
func (Spreadsheet) Trace ¶
func (s Spreadsheet) Trace(msg string)
type SpreadsheetRow ¶
type SpreadsheetRow struct {
Values []any
Uplink *Spreadsheet
}
func NewSpreadsheetRow ¶
func NewSpreadsheetRow(values []any, uplink *Spreadsheet) *SpreadsheetRow
func (SpreadsheetRow) GetKind ¶
func (s SpreadsheetRow) GetKind() int
func (SpreadsheetRow) Inspect ¶
func (s SpreadsheetRow) Inspect(e Idxs) string
Inspect returns a string
func (SpreadsheetRow) Probe ¶
func (s SpreadsheetRow) Probe(e Idxs) string
Inspect returns a string representation of the Integer.
func (SpreadsheetRow) ToTxt ¶
func (s SpreadsheetRow) ToTxt() string
func (SpreadsheetRow) Trace ¶
func (s SpreadsheetRow) Trace(msg string)
func (SpreadsheetRow) Type ¶
func (s SpreadsheetRow) Type() Type
Type returns the type of the Integer.
type String ¶
type String struct {
Value string `bson:"value"`
}
String represents an string.
type TSeries ¶
type TSeries struct {
S []Object `bson:"series"`
// contains filtered or unexported fields
}
func NewTSeries ¶
type Tagword ¶
type Tagword struct {
Index int
}
Integer represents an integer.
func NewTagword ¶
type Time ¶
type Type ¶
type Type int
const ( BlockType Type = 1 IntegerType Type = 2 WordType Type = 3 SetwordType Type = 4 OpwordType Type = 5 PipewordType Type = 6 BuiltinType Type = 7 FunctionType Type = 8 ErrorType Type = 9 CommaType Type = 10 VoidType Type = 11 StringType Type = 12 TagwordType Type = 13 GenwordType Type = 14 GetwordType Type = 15 ArgwordType Type = 16 NativeType Type = 17 UriType Type = 18 LSetwordType Type = 19 CtxType Type = 20 DictType Type = 21 ListType Type = 22 DateType Type = 23 CPathType Type = 24 XwordType Type = 25 EXwordType Type = 26 SpreadsheetType Type = 27 EmailType Type = 28 KindType Type = 29 KindwordType Type = 30 ConverterType Type = 31 TimeType Type = 32 SpreadsheetRowType Type = 33 DecimalType Type = 34 VectorType Type = 35 )
type Uri ¶
func (Uri) GetProtocol ¶
type Vector ¶
func NewVectorFromSeries ¶
type Void ¶
type Void struct{}
Integer represents an integer.
type Word ¶
type Word struct {
Index int
}
Integer represents an integer.