add expr-lang.org support (use with -e)

This commit is contained in:
2026-08-15 00:10:01 +02:00
parent 1bb24327e5
commit b72f8ea9d8
7 changed files with 397 additions and 6 deletions

View File

@@ -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 {