mathworks / MATLAB-Language-grammar

This repository contains a regular expression based language grammar for MATLAB to be used by GitHub Linguist for highlighting MATLAB code on GitHub
49 stars 17 forks source link

Fix elseif and else meta blocks #82

Closed watermarkhu closed 2 months ago

watermarkhu commented 2 months ago

The meta.elseif.matlab and meta.else.matlab scopes only detected for the elseif and else keywords. This is due to both scopes using the match rule, while it should be using begin/end instead. The patterns in the match rule are never used as a match rule does not support patterns.

Also fixes #78 and while declarations are recognized.

Additionally, better support for line continuations including comments in multiline declarations.