Skip to content

Matlab class syntax improvement#75

Closed
oswald3141 wants to merge 1 commit intoScintillaOrg:masterfrom
oswald3141:matlab_class_kwords
Closed

Matlab class syntax improvement#75
oswald3141 wants to merge 1 commit intoScintillaOrg:masterfrom
oswald3141:matlab_class_kwords

Conversation

@oswald3141
Copy link
Copy Markdown
Contributor

@zufuliu suggested adding support for the classes definition syntax in the discussion of PR #70. This PR contains a proposed solution.
It works fine with the correct syntax but employs a little hack: it doesn't recognize function scopes to avoid storing too much data in the line state integer. Instead, it just considers everything within a folding level beyond the 2nd to be a function's scope. This consideration may lead to the erroneous neglect of some keywords (there's an example in the proposed test). However, such a problem can occur only in a file with invalid syntax, so I think it's not really an issue.

Add handling of the following contextual keywords, used in classes'
declarations: properties, methods, events.
@nyamatongwe nyamatongwe added the matlab Caused by the matlab or octave lexer label Apr 20, 2022
nyamatongwe pushed a commit that referenced this pull request Apr 22, 2022
Add handling of the following contextual keywords, used in classes'
declarations: properties, methods, events.
@nyamatongwe
Copy link
Copy Markdown
Member

Committed as 17c58fd with addition to change log and mention of pull number in commit message.

@oswald3141
Copy link
Copy Markdown
Contributor Author

Thank you!

@nyamatongwe
Copy link
Copy Markdown
Member

Included in 5.1.7 release.

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

Labels

matlab Caused by the matlab or octave lexer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants