diff options
Diffstat (limited to 'cmd/vartan/compile.go')
-rw-r--r-- | cmd/vartan/compile.go | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/cmd/vartan/compile.go b/cmd/vartan/compile.go index 0755456..95a4c58 100644 --- a/cmd/vartan/compile.go +++ b/cmd/vartan/compile.go @@ -13,23 +13,7 @@ import ( "spec/grammar/parser" ) -var compileFlags = struct { - output *string -}{} - -/* -func init() { - cmd := &cobra.Command{ - Use: "compile", - Short: "Compile grammar you defined into a parsing table", - Example: ` vartan compile grammar.vartan -o grammar.json`, - Args: cobra.MaximumNArgs(1), - RunE: runCompile, - } - compileFlags.output = cmd.Flags().StringP("output", "o", "", "output file path (default stdout)") - rootCmd.AddCommand(cmd) -} -*/ + func runCompile(args []string) (retErr error) { var tmpDirPath string @@ -85,7 +69,7 @@ func runCompile(args []string) (retErr error) { return err } - err = writeCompiledGrammarAndReport(gram, report, *compileFlags.output) + err = writeCompiledGrammarAndReport(gram, report, "") if err != nil { return fmt.Errorf("Cannot write an output files: %w", err) } |