viluon / LuaExtended

An improved ST3 Lua syntax definition.
MIT License
19 stars 11 forks source link

Improved how function_def contexts are implemented #12

Closed InternetUnexplorer closed 7 years ago

InternetUnexplorer commented 7 years ago

Previously, the function_def contexts worked like this:

However, this broke compatibility with other syntaxes that use LuaExtended, such as @hbomb79's 'Titanium', which included LuaExtended.sublime-syntax in its main context. After function_def_args matched ), the context would be set to LuaExtended's main, not Titanium's. Titanium's main context would no longer work.

In order to fix this, I made a slight change:

This is a much nicer way to transition between the two contexts, and it worked perfectly when tested with @hbomb79's Titanium.sublime_syntaxfile.

On a different note, I also removed some leftover comments from 7708a4784b7e6b6a8093b35516fdf2698ae058aa that were meant to be temporary, but somehow made it into the commit (probably due to a faulty rebase). Sorry about that!

hbomb79 commented 7 years ago

Awesome. Thank you for fixing #10 @InternetUnexplorer

viluon commented 7 years ago

Brilliant.