Takes a parameter and parses it into a gor_definitions
structure, which is basically a named list
of define statements, i.e. def name = code;
gor_define(x)
can be a string, gor_definitions
structure, list, or NULL
# below are just examples of input, not necessarily valid gor `def` code
gor_define("
def #var1# = 10;
def fun($1, $2) = gor $1
| some
| pipe
| step $2;
")
#> $`#var1#`
#> [1] "10"
#>
#> $`fun($1, $2)`
#> [1] "gor $1 | some | pipe | step $2"
#>
#> attr(,"class")
#> [1] "gor_definitions" "list"
gor_define(list(`#var1#` = 10, limit = 20, block = "| some | pipe | step"))
#> Warning: all definitions must be a string, coercing to string
#> #var1# limit block
#> "10" "20" "| some | pipe | step"
#> attr(,"class")
#> [1] "gor_definitions" "list"