Changeset 241

Show
Ignore:
Timestamp:
02/27/07 00:49:52 (2 years ago)
Author:
Alan Knowles
Message:

method calls where getting picked up as abstract methods

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/language/d/Parser.d

    r236 r241  
    204204                        provend = tokensUpto(';'); 
    205205                        pos++; 
     206                        // abstract methods should not appear in Methods or codeblocks 
     207                        // they can look alot like method calls in those cases... 
     208                        if (cast(Method)this.parent || this.parent.getType() == Element.BLOCK) { 
     209                            continue; 
     210                        } 
     211                         
     212                         
    206213                        parseMethod(decres,provend,token, lastComment); 
    207214                        lastComment = null; 
     
    797804        for (int i=start; i<toks.length;i++) 
    798805        { 
     806            //writefln("testDeclaration: state= %d token = %s", state, toks[i].str);  
    799807debug (declaration) writefln("Parser.testDeclaration 1"); 
    800808debug (declaration) writefln("Parser.testDeclaration 1.1 i=%s toks.length=%s", i, toks.length); 
     
    10601068         
    10611069         
    1062         //writefln("got methodtokens %s" , tokensToString(methodtoks)); 
     1070        //writefln("got methodtokens %s" , tokensToString(methodtoks)); 
    10631071         
    10641072