bitwisecook / vscode-tcl

Tcl for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=bitwisecook.tcl
MIT License
39 stars 20 forks source link

syntax state lost for quoted proc body #19

Closed cshorler closed 1 year ago

cshorler commented 1 year ago

I encountered a issue, whilst trying to do something like this: https://wiki.tcl-lang.org/page/Implementing+enumerated+types#mkup_code_1

The minimum code triggering syntax formatting issue seems to be this:

proc hello {} "
    puts {hello, world}
"

####  TESTS ####

hello

I checked the syntax and debugged a bit, the quote seems to trigger the proc-args-singular rule in the grammar.

I tried adding quoted-string to the patterns and debugging a bit - I didn't find the solution yet, if I do - I'll submit a PR.

To make the issue easily visible without using the editor.action.inspectTMScopes, you can type ; # " after the closing quote. Then the following tokens correct themselves and change colour.

cshorler commented 1 year ago

ah... I found the bug, fix incoming!

bitwisecook commented 1 year ago

this is in 0.4.2, now released

cshorler commented 1 year ago

Thanks!

On Sat, 18 Feb 2023, 16:05 James Deucker, @.***> wrote:

this is in 0.4.2, now released

— Reply to this email directly, view it on GitHub https://github.com/bitwisecook/vscode-tcl/issues/19#issuecomment-1435706911, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHKKMDY7LI75WEORY64FLLWYDXNDANCNFSM6AAAAAAVAKZSQE . You are receiving this because you authored the thread.Message ID: @.***>