cyrusfirheir / twee3-language-tools

[ VSCode extension ] Syntax highlighting and programmatic language tools for Twee 3, and Twine 2 storyformats.
https://marketplace.visualstudio.com/items?itemName=cyrusfirheir.twee3-language-tools
MIT License
47 stars 15 forks source link

extension is catching closing tags, but not opening tags. [bug] #130

Closed asianmathematics closed 1 year ago

asianmathematics commented 1 year ago

Screenshot 2023-05-12 223546

Exactly as the title and screenshot state, the extension is giving a malformed tag error, even though it shouldn't.

here's the inside code:

<<switch $difficulty>>
    <<case 0>>
        <<set $Prof = 9>>
        <<set $proficiency = 12>>
        <<set _a = 100>><<set _b =100>><<set _c = 100>>
    <<case 1>>
        <<set $Prof = 6>>
        <<set $proficiency = 10>>
        <<set _a = 32>><<set _b =29>><<set _c = 26>>
    <<case 2>>
        <<set $Prof = 3>>
        <<set $proficiency = 6>>
        <<set _a = 29>><<set _b =26>><<set _c = 23>>
    <<case 3>>
        <<set $Prof = 2>>
        <<set $proficiency = 3>>
        <<set _a = 26>><<set _b =23>><<set _c = 20>>
    <<case 4>>
        <<set $Prof = 1>>
        <<set $proficiency = 1>>
        <<set _a = 23>><<set _b =20>><<set _c = 17>>
    <<case 5>>
        <<set $Prof = 0>>
        <<set $proficiency = 0>>
        <<set _a = 20>><<set _b =17>><<set _c = 14>>
    <<default>>
        ERROR: Difficulty has been incorrectly set
<</switch>>
cyrusfirheir commented 1 year ago

Add a passage header above it. Twee syntax doesn't work outside of passages, so the diagnostics don't work as expected either. Just a

:: Test

should be enough

asianmathematics commented 1 year ago

well darn, thanks.