~ubuntu-branches/ubuntu/wily/codelite/wily

« back to all changes in this revision

Viewing changes to sdk/codelite_indexer/libctags/c.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-07-29 19:42:47 UTC
  • mfrom: (0.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100729194247-hqgxamd2yl8f1l7x
* New upstream release.
* Bump Standards.
* Refresh patches.
* Add license information about files under ./Debugger/

Show diffs side-by-side

added added

removed removed

Lines of Context:
2596
2596
 */
2597
2597
static void nextToken (statementInfo *const st)
2598
2598
{
 
2599
        const tokenInfo *const prev  = prevToken (st, 1);
 
2600
        const tokenInfo *const prev2 = prevToken (st, 2);
 
2601
        const tokenInfo *const prev3 = prevToken (st, 3);
2599
2602
        tokenInfo *token;
2600
2603
        do
2601
2604
        {
2604
2607
                {
2605
2608
                        case EOF: longjmp (Exception, (int) ExceptionEOF);  break;
2606
2609
                        case '(': analyzeParens (st);                       break;
2607
 
                        case '<': processAngleBracket ();                   break;
 
2610
                        case '<': {
 
2611
                                if(prev->type == TOKEN_NAME && prev2->keyword == KEYWORD_CLASS && prev3->keyword == KEYWORD_TEMPLATE) {
 
2612
                                        /* we found a template instantiation */
 
2613
                                        CollectingSignature = TRUE;
 
2614
                                        
 
2615
                                        /* Keep the template instantiation list */
 
2616
                                        /* clear the Signature global buffer */
 
2617
                                        if(Signature->size) {
 
2618
                                                memset(Signature->buffer, 0, Signature->size);
 
2619
                                        }
 
2620
                                        Signature->length = 0;
 
2621
                                        vStringPut(Signature, '<');
 
2622
                                        processAngleBracket ();
 
2623
                                        
 
2624
                                        vStringCat(prev->name, Signature);
 
2625
                                        /* clear the Signature global buffer */
 
2626
                                        if(Signature->size) {
 
2627
                                                memset(Signature->buffer, 0, Signature->size);
 
2628
                                        }
 
2629
                                        Signature->length = 0;
 
2630
                                        CollectingSignature = FALSE;
 
2631
                                        
 
2632
                                } else {
 
2633
                                        processAngleBracket ();
 
2634
                                }
 
2635
                                break;
 
2636
                        }
2608
2637
                        case '*': st->haveQualifyingName = FALSE;           break;
2609
2638
                        case ',': setToken (st, TOKEN_COMMA);               break;
2610
2639
                        case ':': processColon (st);                        break;