aboutsummaryrefslogtreecommitdiff
path: root/cmd/starlark
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@gmail.com>2019-01-02 17:58:35 -0500
committerGitHub <noreply@github.com>2019-01-02 17:58:35 -0500
commitf9eba728dc959ed06f508aaac74f1fe710800c8f (patch)
tree4a7d9625e499b884b39b7e60a0d631b896305761 /cmd/starlark
parent70a4f43bd14540d466ebd8601bbcd358d47ef7af (diff)
parentc0b6b768d91b2b919fd75c060b95f91ecb3b6d8a (diff)
downloadstarlark-go-f9eba728dc959ed06f508aaac74f1fe710800c8f.tar.gz
Merge pull request #77 from google/options
starlark: permit if/for/while at toplevel if -globalreassign
Diffstat (limited to 'cmd/starlark')
-rw-r--r--cmd/starlark/starlark.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/starlark/starlark.go b/cmd/starlark/starlark.go
index 0fad4c3..1035a1b 100644
--- a/cmd/starlark/starlark.go
+++ b/cmd/starlark/starlark.go
@@ -29,12 +29,13 @@ var (
// non-standard dialect flags
func init() {
- flag.BoolVar(&resolve.AllowFloat, "fp", resolve.AllowFloat, "allow floating-point numbers")
+ flag.BoolVar(&resolve.AllowFloat, "float", resolve.AllowFloat, "allow floating-point numbers")
flag.BoolVar(&resolve.AllowSet, "set", resolve.AllowSet, "allow set data type")
flag.BoolVar(&resolve.AllowLambda, "lambda", resolve.AllowLambda, "allow lambda expressions")
flag.BoolVar(&resolve.AllowNestedDef, "nesteddef", resolve.AllowNestedDef, "allow nested def statements")
flag.BoolVar(&resolve.AllowBitwise, "bitwise", resolve.AllowBitwise, "allow bitwise operations (&, |, ^, ~, <<, and >>)")
flag.BoolVar(&resolve.AllowRecursion, "recursion", resolve.AllowRecursion, "allow while statements and recursive functions")
+ flag.BoolVar(&resolve.AllowGlobalReassign, "globalreassign", resolve.AllowGlobalReassign, "allow reassignment of globals, and if/for/while statements at top level")
}
func main() {