On 15 March 2010 18:14, Carnë Draug <[email protected]> wrote:
> On 10 March 2010 21:35, Carnë Draug <[email protected]> wrote:
>>> We, however, also allow
>>>
>>> #{
>>> This is a comment
>>> #}
>>>
>>
>> I didn't knew about the Octave version of block comments. I though
>> only the same as Matlab worked. I'll change this in the metadata and
>> change the syntax highlight as well.
>>
>
> When I was adding this to the syntax file I noticed that it's possible
> to have block comments inside block comments. Is this supposed to be
> this way or is it a bug? here's an example of what I mean
>
> printf ("Not comment 1\n");
> #{
> printf ("Comment 1\n");
> #{
> printf ("Comment 2\n");
> #}
> printf ("I'd have guessed NOT a comment but it is a comment\n");
>
> Shouldn't the fact that it's inside a block comment, ignore the start
> of another block comment?
>
> Carnë Draug
>
I asked on the help mailing list and they told me it is a feature for
compatibility with MatLab and not a bug. I kept making changes on the
lang file, here's what I changed more
*On pkg as preprocessor
Now it only highlights 'pkg' and its commands (no longer everything
up to the end of the line)
If "pkg" is called like a function "pkg ("load",...)" then it's
highlighted as a function
*On constants/functions
Functions such as Inf, pi, NaN which can be called with no arguments
to return constant value, are highlighted as constants in those
situations but still as functions if followed by opening parenthesis.
I only know about eps, (I|i), (Inf|inf), (NaN|nan), NA, ones, pi and
zeros. Is there other ones?
*On keywords
added the keywords, persistent, replot, static, varargin, varargout
removed the keywords assert, nargin, nargout and moved them to
builtin functions
*On block comments
highlights correctly when block comments are nested
*On builtin function
just to make it look pretty I mixed some very similar functions names
into one such as "(a)?sin(d|h)?"
here's what I am doing to deal with the problem of functions being
removed in the future and keep being highlighted. I removed all
functions from the list that appear in the folder deprecated. Then,
I'll keep all functions that also exist in matlab. With the rest of
functions, I'll see later what to do with them.
Carnë Draug
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev