Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

var overdraftFeatureFlag bool
var oneOfFeatureFlag bool
var accountInterpolationFlag bool

type inputOpts struct {
Script string `json:"script"`
Expand Down Expand Up @@ -125,6 +126,9 @@
if oneOfFeatureFlag {
featureFlags[interpreter.ExperimentalOneofFeatureFlag] = struct{}{}
}
if accountInterpolationFlag {
featureFlags[interpreter.ExperimentalAccountInterpolationFlag] = struct{}{}
}

Check warning on line 131 in internal/cmd/run.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/run.go#L129-L131

Added lines #L129 - L131 were not covered by tests

result, err := interpreter.RunProgram(context.Background(), parseResult.Value, opt.Variables, interpreter.StaticStore{
Balances: opt.Balances,
Expand Down Expand Up @@ -206,6 +210,7 @@
// Feature flag
cmd.Flags().BoolVar(&overdraftFeatureFlag, interpreter.ExperimentalOverdraftFunctionFeatureFlag, false, "feature flag to enable the overdraft() function")
cmd.Flags().BoolVar(&oneOfFeatureFlag, interpreter.ExperimentalOneofFeatureFlag, false, "feature flag to enable the oneof combinator")
cmd.Flags().BoolVar(&accountInterpolationFlag, interpreter.ExperimentalAccountInterpolationFlag, false, "enables an account interpolation syntax, e.g. @users:$id:pending")

Check warning on line 213 in internal/cmd/run.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/run.go#L213

Added line #L213 was not covered by tests

// Output options
cmd.Flags().StringVar(&runOutFormatOpt, "output-format", OutputFormatPretty, "Set the output format. Available options: pretty, json.")
Expand Down