remy / vscode-nextbasic

VS Code tools for NextBASIC

Home Page:https://marketplace.visualstudio.com/items?itemName=remysharp.nextbasic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with Syntax recognition changes

Andy1966uk opened this issue · comments

Hi Remy,

Latest version of the extension 1.3.12 has caused an issue with errors showing in working syntax.

eg. the line IF % SPRITE 20=1 THEN SPRITE 20,smx,smy,12,0

SPRITE 20 now highlights the "20" will an error

Also

IF %in 49150 & @1 = 0 ( which is used to detect the ENTER KET being pressed)

Now highlights "49150" as an error

I spotted this myself last night too and have a local copy ready to resolve it (I just wanted to check I wasn't introducing more bugs!).

I'll ship is shortly this morning.

Just double checking, this line:

IF %in 49150 & @1 = 0

Should have a THEN following, right?

Update going live into the marketplace now.

Yes , IF %in 49150 & @1 = 0 THEN PRINT " " ....... etc.

Thanks Remy

All good :) I noticed the setting for max files to copy over, thanks for that :)

Just to let you know, I'm constantly trying to improve the validation process - so that we devs working outside of the native next editor, get some feedback before sending to the machine. The tricky part is around the integer expression logic - when it turns on and off - which is the validation false positive you're seeing.

You can, if you want, opt out of validation from the nextbasic vscode config, but if you keep it on, and notice anything wrong, your reports are really helpful.

I've got some decent test coverage so any changes I made going through a lot of tests before it can be shipped.

Also note that the validation doesn't affect whether it exports the .bas file at all.

That all said, I can already see another false positive on IF % SGN {f < 0} THEN %g=%a - it's incorrectly reporting a parsing error.

understood, great stuff thx... how's your game going ? I am struggling getting scrolling to work for a large tile map from left to right.....

It's coming along well except for when I need to get to 10 mummy's on screen - all using their own logic to decide their directions - it hoses the performance. I've tried a few refactors to see if I can boost the speed but it's not making any difference.

My next plan is to see if I can re-plan the mummy's route around the screen and offload the work to SPRITE CONTINUE - just need to plan how it'll work. Thankfully I decided to shift my work into git on the chance I'd need to revert (and god I did!) https://github.com/remy/next-oh-mummy