sachaos / todoist

Todoist CLI Client. I ❤️ Todoist and CLI.
MIT License
1.46k stars 105 forks source link

Todoist-cli crashes with wrong filters #37

Closed strangeman closed 6 years ago

strangeman commented 6 years ago
todoist l -f "today || yesterday"
panic: syntax error

goroutine 1 [running]:
main.(*Lexer).Error(0xc420089600, 0x880777, 0xc)
    filter_parser.y:329 +0x63
main.(*yyParserImpl).Parse(0xc42019f880, 0xaa20e0, 0xc420089600, 0x0)
    yaccpar:253 +0x3506
main.yyParse(0xaa20e0, 0xc420089600, 0xc420120480)
    yaccpar:153 +0x4f
main.Filter(0x7fff3c3dd992, 0x12, 0x6, 0x7fff3c3dd992)
    filter_parser.y:335 +0x16d
main.List(0xc4200df340, 0x0, 0x0)
    /mnt/src/sources/go/src/github.com/sachaos/todoist/list.go:18 +0x225
github.com/sachaos/todoist/vendor/github.com/urfave/cli.HandleAction(0x7f3100, 0x898940, 0xc4200df340, 0xc420120400, 0x0)
    /mnt/src/sources/go/src/github.com/sachaos/todoist/vendor/github.com/urfave/cli/app.go:490 +0xd2
github.com/sachaos/todoist/vendor/github.com/urfave/cli.Command.Run(0x87b029, 0x4, 0x0, 0x0, 0xc420087020, 0x1, 0x1, 0x881a37, 0xf, 0x0, ...)
    /mnt/src/sources/go/src/github.com/sachaos/todoist/vendor/github.com/urfave/cli/command.go:210 +0xa95
github.com/sachaos/todoist/vendor/github.com/urfave/cli.(*App).Run(0xc42008eea0, 0xc4200a6040, 0x4, 0x4, 0x0, 0x0)
    /mnt/src/sources/go/src/github.com/sachaos/todoist/vendor/github.com/urfave/cli/app.go:255 +0x6f8
main.main()
    /mnt/src/sources/go/src/github.com/sachaos/todoist/main.go:250 +0x15f1
sachaos commented 6 years ago

I merged The PR! Thank you! 🎉