}
idxSchema = schema->list[idxSchema].atom.v.list.head;
err.offSchema = schema->offsets[idxSchema];
- size_t taken = SIZE_MAX;
+ size_t taken = idxData;
bool eachInList = false;
bool eachInMap = false;
struct KEKSSchemaErr errCmd;
}}
}
var taken string
- var vs []any
+ vs := []any{data}
for cmdIdx, cmd := range cmds {
if len(cmd) == 0 {
return &SchemaErr{BaseErr: BaseErr{
If "k" equals to ".", then choose the element you are currently in.
Command never fails, but key can be non-existent.
All following commands will be applied to the taken value.
+ By default analogue of [".", "."] command is executed when schema
+ check is called.
EXISTS | ["E"]
Assure that chosen element exists.
{
"where": [
- [".", "."],
["T", "LIST"],
[">", 1],
["<", 3],
["<", 181],
],
"wheres": [
- [".", "."],
["T", "LIST"],
[">", 0],
["*"],
$root/keks.tcl >schema.keks.hex <<EOF
MAGIC schema
MAP {e {LIST {
- {LIST {{STR .} {STR .}}}
{LIST {{STR T} {STR LIST}}}
{LIST {{STR *}}}
{LIST {{STR T} {STR INT}}}
proc field {k types args} {
upvar _cmds _cmds buf buf
- lappend _cmds [TAKE $k]
+ if {$k != "."} {
+ lappend _cmds [TAKE $k]
+ }
if {[lindex $types 0] == "with"} {
lappend _cmds [SCHEMA [lindex $types 1]]
} elseif {[lsearch -exact $types set] == -1} {