Closed ConcernedCivet closed 4 years ago
Hmm, I'm certainly in no position to tell anyone how to code.
(I haven't actively used BlitzMax in about 10 years)
But I believe that Private
and Public
acts as sort of a "block" or "state".
Where anything below Private
would be private until Public
is called.
So it's not something you'd specifically assign to one single function.
For example, both test1
and test2
would be private in this case:
Private
Function test1()
Print( "Hello 1" )
EndFunction
Function test2()
Print( "Hello 2" )
EndFunction
Even in the following example both functions would be private:
Private Function test1()
Print( "Hello 1" )
EndFunction
Function test2()
Print( "Hello 2" )
EndFunction
So I'm not sure I'd like to actively encourage this way of coding by supporting it. Having said that, I feel like as long as BlitzMax allows it; I should support it... I guess I'll have a look at it!
Do you have any example of hex and binary literals not being correctly coloured?
And thank you for using the extension, reporting issues, and bringing a smile to my face!
I see what you mean, and I don't want to encourage bad practices or change the language into something it isn't, so I guess that is more of an issue with the way I code in Max.
Here is a screenshot for the hex and binary literals:
If I'm not mistaken, they should all be light-blue in this case.
From the bottom two, I'm guessing it's using a fallback where it's checking for the standard 0x hex literal, but to be honest, I don't have the first clue how to setup a plugin for VSC. Hopefully the screenshot helps though!
https://github.com/Hezkore/vscode-blitzmax-support/commit/5ced2c1e16ca7771ac82a421529448fbf7c00cce fixes all of these issues. Pushed to marketplace as version 1.29.0.
Setup (place X in matching boxes):
Describe the bug Good Afternoon!
Any function or type that is after an accessor ('Private', 'Public', Etc..) will not show in the outline.
As an example:
will display correctly in the outline, but
will not.
I do know that this is probably not standard convention for Max, but it doesn't cause a compiler error and the latest version of BlitzMax (NG) is able to list the items in its outline without issue.
I have also noticed syntax highlighting for hex and binary literals is not working, but the Outline is the one we use the most.
Screenshots
Thank you for all the work you have been doing on here! At the risk of GitHub getting mad, I have to tell you that this plugin is fucking awesome!
Edit: Bad grammar!