talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

Syntax error makes entire .talon file unusable #79

Closed rntz closed 4 years ago

rntz commented 4 years ago

The following file (test.talon) gets completely ignored because of the first line's syntax error, rendering the second line inoperative:

stupid test(): insert("hello world")
different command: insert("different command")

Producing the following log:

2020-06-18 16:20:38 ERROR Failed to load: /home/rntz/.talon/user/mine/test.talon
   26: lib/python3.7/threading.py:890| 
   25: lib/python3.7/threading.py:926| 
   24: lib/python3.7/threading.py:870| 
   23:              talon/cron.py:112| 
   22: ------------------------------# cron thread
   21:              talon/cron.py:77 | 
   20:    talon/scripting/rctx.py:199| 
   19: ------------------------------# 'cron' main:<lambda>()
   18:                talon/fs.py:31 | 
   17:                talon/fs.py:24 | 
   16:    talon/scripting/rctx.py:199| 
   15: ------------------------------# 'fs' main:on_change()
   14:    app/resources/loader.py:558| 
   13:    app/resources/loader.py:509| 
   12:    app/resources/loader.py:405| 
   11: ------------------------------# stack splice
   10:    app/resources/loader.py:403| 
    9:    app/resources/loader.py:389| 
    8: talon/scripting/context.py:407| 
    7: talon/scripting/context.py:392| 
    6: talon/scripting/context.py:87 | 
    5: talon/scripting/context.py:87 | 
    4: talon/scripting/context.py:150| 
    3:      talon/grammar/rule.py:36 | 
    2:    talon/grammar/parser.py:184| 
    1:    talon/grammar/parser.py:175| 
talon.grammar.parser.ParseError:   Line: 1, Column: 13 - unexpected token
      stupid test()
                  ^
  Expected: (,<,KEY,WORD,[,{

Talon version 1351 on linux.

lunixbochs commented 4 years ago

Will be fixed in next release, thanks

2020-06-18 17:42:58 ERROR Skipping broken entry `stupid test()`
Traceback (most recent call last):
...
talon.grammar.parser.ParseError:   Line: 1, Column: 13 - unexpected token
      stupid test()
                  ^
  Expected: (,<,KEY,WORD,[,{