Changeset 1595

Show
Ignore:
Timestamp:
08/29/08 17:28:20 (3 months ago)
Author:
rob
Message:

Fixed #521: added const to method signature recognition for the C like function name match

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/lib/foldexplorer.py

    r1180 r1595  
    175175    _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' 
    176176     
    177     funcre = re.compile(r'\s*((?:[a-zA-Z0-9_*&\s])+?(?:\s|[*]+))' # return arguments 
     177    funcre = re.compile(r'(?:\s*const)?\s*((?:[a-zA-Z0-9_*&\s])+?(?:\s|[*]+))' # return arguments 
    178178                        r'([a-zA-Z_][a-zA-Z0-9_:]*)'              # method name 
    179179                        r'(\s*\((?:([^;]*?|\s*))\))'              # signature 
  • trunk/tests/samples/cppfunctions.cpp

    r1371 r1595  
    137137} 
    138138 
     139const float& Stuff::Things(const Gunk *Crud) { 
     140    stuff; 
     141} 
     142 
     143const float& Things(const int *Crud) { 
     144    stuff; 
     145} 
     146