rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
162 stars 46 forks source link

disable next line doesn't seem to work #84

Closed georgejecook closed 2 years ago

georgejecook commented 4 years ago
'bs:disable-next-line
 m.top.sdkTask.exit = true

still results in error

TwitchBronBron commented 4 years ago

@georgejecook is this still an issue?

markwpearce commented 4 years ago

this is still an issue... with VS Code Brightscript language extension 2.1.21 (uses brightscript@0.10.0)

  'bs:disable-next-line
  Dim requestData[requestList.count()]

still results in error (Found unexpected token 'Dim')

TwitchBronBron commented 4 years ago

@markwpearce can you provide any additional steps to reproduce? This works just fine for me. ignore line bs comment

TwitchBronBron commented 4 years ago

I have refactored the disable comments to support leading whitespace, and also to utilize the tokenizer instead of splitting the source file by newline and manually parsing it. Hopefully one of these two things has resolved your issue. #108

TwitchBronBron commented 4 years ago

@markwpearce any updates on this?

markwpearce commented 4 years ago

Running version 2.4.4, it still shows up as a "problem" with red underline in vs Code.

sub testDimNoDisable()
  dim array[3]
end sub

sub testDimWithDisable()
  'bs:disable-next-line
  dim array[3]
end sub

Both of the "dim" statements above get the red underline, with

{ "resource": "test.brs", "owner": "_generated_diagnostic_collectionname#0", "code": "1081", "severity": 8, "message": "Found unexpected token 'dim'", "source": "brs", "startLineNumber": 2, "startColumn": 3, "endLineNumber": 2, "endColumn": 6 }

TwitchBronBron commented 2 years ago

@markwpearce is this still an issue?

markwpearce commented 2 years ago

Nope! I'll close it