Closed chere005 closed 6 years ago
Thanks for opening this issue!
f[x_, OptionsPattern[]] :=
is now fixed in 49b4cd3
:=
on a different line. This cannot be fixed because the :=
is scanned for with regex lookahead, which only matches until end of line. Many other language syntax highlighters have this issue (such as the built in syntax highlighting for JavaScript). See further discussion of this issue for the Julia language here.
Regarding the other issues you raise, I'm not I see how these should be highlighted. Ideally you could give failing tests in syntax_test.wl by opening a PR with failing tests, in this way it is much easier for me to provide a fix, and you can have a go at it if you want as well.
Any updates on this?
Haven't had any time to look at this, sorry. I will try to in the next few weeks. The other fixes were necessary for me to keep working effectively :)
On Wed, May 24, 2017 at 8:53 AM, Viktor Qvarfordt notifications@github.com wrote:
Any updates on this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ViktorQvarfordt/Sublime-WolframLanguage/issues/2#issuecomment-303730461, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa3Cz2_IXDluxskAwUQuC6K6Qf6_J43-ks5r9DZNgaJpZM4NMCS0 .
Is the problem solved? @chere005
This problem is solved after most recent PRs. Yay!
try the following:
It no longer looks like a function definition because of the right bracket from ]
Also consider that if the := is on a different line like:
Lastly it would be nice if when typing a variable using Blank, anything on the right showed up like a function
fooInteger <- foo should look like a var name, and "Integer" should look like a function..
Also don't forget about cases like
Blank patterns show up all over the place.. It would be nice if something like the following had some highlighting for x___