diff --git a/go/src/miller/types/mlrval.go b/go/src/miller/types/mlrval.go index 3687421e1..cd06224af 100644 --- a/go/src/miller/types/mlrval.go +++ b/go/src/miller/types/mlrval.go @@ -105,3 +105,18 @@ var TYPE_NAMES = [MT_DIM]string{ "array", "map", } + +// TODO: comment more re typedecls +type MVTypeMask int + +const ( + MT_TYPE_MASK_STRING MVTypeMask = (1 << MT_STRING) | (1 << MT_VOID) + MT_TYPE_MASK_INT = 1 << MT_INT + MT_TYPE_MASK_FLOAT = 1 << MT_FLOAT + MT_TYPE_MASK_NUM = (1 << MT_INT) | (1 << MT_FLOAT) + MT_TYPE_MASK_BOOL = 1 << MT_BOOL + MT_TYPE_MASK_ARRAY = 1 << MT_ARRAY + MT_TYPE_MASK_MAP = 1 << MT_MAP + MT_TYPE_MASK_VAR = (1 << MT_VOID) | (1 << MT_STRING) | (1 << MT_INT) | + (1 << MT_FLOAT) | (1 << MT_BOOL) | (1 << MT_ARRAY) | (1 << MT_MAP) +) diff --git a/go/todo.txt b/go/todo.txt index 00ee8a709..14cd962fe 100644 --- a/go/todo.txt +++ b/go/todo.txt @@ -4,14 +4,14 @@ TOP OF LIST: * window.mlr, window2.mlr -> doc somewhere * UDF nexts: + o typedecls + o is_x and asserting_x + o put -s ... o take another look at mlr -n and seqgen -- ? - rand-walk seqgen-then example - mlr -n put -f mand.mlr o regexes & associated functions -- necessary or not? -! put -s ... -! is_x and asserting_x -! local vars w/ typing; UDFs with typing at parameters & retvals * Check for "Options:" in all mappers * check for `f.Value` reassigned in all mappers -- reflects true default? * UDS