суббота, 2 февраля 2013 г.

оператор long в матлабе

I believe that replacing it with this should fix it. This says to recognize the single quote as an operater, as long as it's preceded by letters/nums or ] or ). It's not perfect - it won't catch cases where there's a space before the transpose operator. But it should be an improvement on the current version because it won't turn the preceding stuff into Text.

(r'([\\w\\)\\]]+)(\\')', bygroups(Text, Operator)),

Use the Tango color scheme here to see that it's not quite right:

Most of these work, except for the ones with comments:

The Matlab lexer handles the special case where a single quote is used as a transpose operator, instead of as the marker to start and end strings. However, the way the code is written, there is a side effect: whatever came right before the transpose operater gets turned into plain Text, even if it's supposed to be a Punctuation.

Matlab lexer: Doesn't properly handle transpose operator

is a free Mac client by Atlassian for Git, Mercurial and Subversion.

/ #414 - Matlab lexer: Doesn't properly handle transpose operator

Комментариев нет:

Отправить комментарий