[TxMt] C bundle: Functions with multi-line argument lists
John Kooker
jkooker at apple.com
Wed Jun 13 18:06:09 UTC 2007
Ha, sorry to imply that 2.0 needed to be the "achieve world peace"
release. I just thought it was pretty common practice to have multi-
line function prototypes, which would make this bug a pretty big
deal. But I guess you're right - it's features vs. performance, so
there will always be trade-offs. Thanks for the explanation!
John
On Jun 9, 2007, at 1:29 AM, Allan Odgaard wrote:
> On 8. Jun 2007, at 18:51, John Kooker wrote:
>
>> wow, not even for 2.0?
>
> No, not even for 2.0. As said, this is a technical limitation!
>
> If you allow patterns to match more than a single line, you have a
> situation where a change, no matter where it is done in the
> document, can affect every other part of the document.
>
> From a performance perspective this is bad because technically TM
> would then have to re-parse your entire document, each time you do
> a single change.
>
> Other text editors can live with this, that is, they may re-parse
> from 5 lines above the caret, then after .5s of idle time, re-parse
> the full document, or sometimes they may just leave it to the user
> to fix out-of-sync syntax highlight.
>
> In TextMate the parser is used for more than syntax highlighting,
> it is for example used to decide how to interpret your key strokes,
> that means if the current line is not parsed, TM cannot decode your
> key stroke -- in practice it could rely on outdated information,
> but that leads to a situation where the exact same key sequence can
> give different results (depending on whether or not the parser
> finished in time, or whether or not the outdated information is
> “good enough”).
>
> Maybe some good heuristics for this can be created, but 2.0 is not
> going to be the “fix all problems ever reported”-release, which
> your reply seems to imply it is.
>
>
>
>> On Jun 8, 2007, at 12:40 AM, Allan Odgaard wrote:
>>> On 8. Jun 2007, at 02:10, John Kooker wrote:
>>>
>>>> My C/C++ code doesn't always get parsed correctly, and I think
>>>> I've narrowed the problem down: the bundle doesn't seem to like
>>>> it when my parentheses are on separate lines. An example:
>>> Function prototypes are only matched when they are on a single
>>> line. This is a technical limitation of the parser, and unlikely
>>> to go away.
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
More information about the textmate
mailing list