[TxMt] C syntax fixes
ob at bitmover.com
Wed Jan 25 22:52:51 UTC 2006
On Jan 25, 2006, at 2:29 PM, Allan Odgaard wrote:
> On 20/1/2006, at 0:18, Oscar Bonilla wrote:
>> Please disregard my previous email... I think I've fixed it.
>> Here's a patch:
>> This patch fixes the following:
>> - "#else" directives are now tagged with the proper scope
> I couldn't see anything in your patch affecting this, and it does
> not seem to be broken!?!
That's because I based the patch on an old version of the file... duh!
>> - "#define" for things that are not functions do not get tagged as
> I applied this.
>> - Functions defined in multiple lines are tagged as functions.
> I wasn't comfortable with this patch -- your patch actually
> contained 7 changes to the C.plist, I think 4 of them reverting
> something to a prior version. As for the function markup, it seemed
> to also remove a large part of the syntax which ensure a storage
> type in front of the function name. Maybe intentional because you
> only have the function name on the line? But it would conflict with
> custom macros like “foreach(something)”.
No. The problem occurred with an older version of the C syntax file
that didn't seem to handle declarations such as:
TclCompileExprWords(interp, tokenPtr, numWords, envPtr)
Tcl_Interp *interp; /* Used for error and status reporting. */
Tcl_Token *tokenPtr; /* Points to first in an array of word tokens
* tokens for the expression to compile
* inline. */
int numWords; /* Number of word tokens starting at tokenPtr.
* Must be at least 1. Each word token
* contains one or more subtokens. */
CompileEnv *envPtr; /* Holds the resulting instructions. */
It seems the new C.plist handles them. I just didn't have the latest
> Btw: Mail lose the leading space on lines when followed by a tab
> (because of how it uses WebKit and tries to workaround the WebKit
> whitespace stripping rules, but is not fully successful), so
> patches for files which use leading tabs gets mangled by Mail when
> pasted into the mail body, i.e. better to gzip them or similar (as
> long as Mail has this problem).
Thanks for the tip, I'll keep it in mind.
pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
More information about the textmate