feat: read from std in

This commit is contained in:
2025-12-25 00:46:48 -05:00
parent 88ee4f799e
commit a56ec808ec
4 changed files with 22 additions and 1 deletions

View File

@@ -20,6 +20,11 @@ func main() {
logger.Info("Using program arguments.", "args", os.Args)
logger.Info("Parsed CLI options.", "options", options)
if options.Input == "-" {
options.Input, err = cli.ReadInput()
cli.HandleError(err)
}
tokens, fails := tokenizer.GetTokens([]rune(options.Input))
if len(fails) > 0 {
cli.HandleError(errors.Join(fails...))