Closed ldct closed 5 years ago
Thank you for this report, I think I noticed this already and tried to fix it but it was almost impossible with how it's currently implemented. SublimeText recently implemented better syntax definition system and I plan to investigate after holidays (august ...). After possible rewrite of solidity highlighter in updated system, I will try to tackle these edge cases, hopefully it will be easier. If someone has a temporary fix now, welcome, otherwise we see after cleanup and rewrite.
Thank you again!
Another one here who's missing that! Any news about it?
Hi there! I'm quite sorry, finishing something important, but slowly getting back to this rewrite, see discussion here: https://github.com/davidhq/SublimeEthereum/issues/29
I hope and believe that until 15.1.18 this package could be rewritten to the new syntax parsing system.
I have some good news:
This is how the rewrite in the new context push syntax looks for the function
:
https://gist.github.com/davidhq/811662ede7c304e146ed73c9e8e27259
So I managed to move forward with this greatly, I think there are no big open questions and I understand how to implement the rest of this, I just need a few more days to finish... will let you know when it can be tested.
Another update, current state of capabilites:
I think most of big things are implemented, but I do still need to finish conditionals and loops... I hope no big issues there... So far it's 500 LOC, expect 200 or so more... old parser was 100 lines in total.
done, please test
Yes, it seems that PackageControl
hack picked up v1.1.0 already... so it should install automatically if you have packages auto-update turned on as by default, if not, update the package Ethereum manually inside SublimeText
Yeah, you can see that I even removed my comment. I had to uninstall and re-install it.
It works! Thanks heaps, David!
Some very minor highlighting is missing (mainly from here, to be released in v1.1.1 quite soon, together with any issues you guys report by then...)
Enjoy better colors! this was harder to implement than I thought... or better said I suspected it would be hard and so I procrastinated for over a year in tackling it ^_^
Now it finally should also be easy to understand and contribute minor or major (?) enhancements . As well as being able to learn quite a lot about Solidity itself by looking at solidity-syntax file.
@paulofelipe84 yes I saw your comment was removed after I posted my reply. Anyway, if someone else has problems with update, I'd also like to know if it's always needed to remove and re-install... you probably have packages auto-update turned off... or it might just be enough to wait a little, not sure how auto-update for packages works exactly / how frequently it checks for new package releases.
Currently, the last item on this list is not highlighted properly:
It is correct if either 1) a comma is inserted after
bytes32[] s
, or 2) the newline between thebytes32[] s
and the closing paren is deleted. However (1) is a syntax error in solidity and (2) is ugly.