rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 40 forks source link

Syntax Error on If .... Then #101

Closed vbasky closed 5 years ago

vbasky commented 5 years ago

Valid syntax now shows expected a statement to follow if ... condition

screen shot 2019-03-05 at 10 19 21 am

Version: 1.9.0-beta5

TwitchBronBron commented 5 years ago

I'm trying to reproduce this, but it seems to be working for me. Can you try to narrow down the actual syntax causing the error? I'm thinking there might be a syntax bug somewhere else, causing a chain of additional syntax errors shown in your code.

'This shows no syntax errors at all
sub Main()
    k = true
    if k then
        If true then
            m.play_button.setFocus(true)
        End If
    end if
end sub
TwitchBronBron commented 5 years ago

Nevermind! I just realized the issue is the capital "T" in "Then". Thanks.

TwitchBronBron commented 5 years ago

I just opened this issue in the brs project. When it gets fixed there, I will update this project.

vbasky commented 5 years ago

Oh yeah the setting on vscode is 'brightscript.format.keywordCase' : 'title'

TwitchBronBron commented 5 years ago

That's only used when you use the format document command in vscode. Shouldn't have any affect on the code itself (except for this bug lol)

TwitchBronBron commented 5 years ago

This was fixed in 1.9.0-beta7.