mirror of
https://codeberg.org/scip/ts.git
synced 2026-08-24 06:44:19 +02:00
add expr-lang.org support (use with -e)
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"codeberg.org/scip/ts/pkg/runexpr"
|
||||
)
|
||||
|
||||
func Die(format string, err error) int {
|
||||
@@ -36,6 +38,12 @@ func Main(output io.Writer) int {
|
||||
return Die("failed to initialize", err)
|
||||
}
|
||||
|
||||
if conf.Expr != "" {
|
||||
runexpr.RunExpr(conf.Expr)
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
tp := NewTP(conf)
|
||||
|
||||
if err := tp.ProcessTimestamps(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user