Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving semantic syntax highlighting #143

Open
YellowAfterlife opened this issue Mar 23, 2021 · 0 comments
Open

Improving semantic syntax highlighting #143

YellowAfterlife opened this issue Mar 23, 2021 · 0 comments

Comments

@YellowAfterlife
Copy link
Owner

There is currently a bunch of small issues related to GMEdit not being actively aware of nested functions:

  • with disables semantic highlighting for implicit self variables (fn() vs self.fn()) for the entire top-level function
  • Multi-level local variables are shared across the top-level function
  • Outline-view only knows top-level and sub-top-level functions - no nesting

The root cause for all of these is that GMEdit does not have knowledge of nested scopes through the file - it only notes down top-level scopes (see: GmlScopes) and then another level in outline-view.

Addressing this requires rewriting a good chunk of syntax highlighting to store nested context data (chain of names along with ending curly bracket depths) inside AceGmlState.

Caveats include

with (some) a += b
    + c

being pretty much impossible to highlight correctly without even broader rewrites to make syntax highlighter aware of current code context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant