Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/fastparser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12840/src/org/python/pydev/parser/fastparser
Modified Files:
FastParser.java
Log Message:
Previous/next method could match 'class' and 'def' on invalid location
Index: FastParser.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FastParser.java 23 Feb 2008 18:58:16 -0000 1.1
--- FastParser.java 3 May 2008 13:37:39 -0000 1.2
***************
*** 34,41 ****
//spaces* 'def' space+ identifier
! private static final Pattern FUNCTION_PATTERN = Pattern.compile("(\\s*)(def\\s+)(\\w*)");
//spaces* 'class' space+ identifier
! private static final Pattern CLASS_PATTERN = Pattern.compile("(\\s*)(class\\s+)(\\w*)");
--- 34,41 ----
//spaces* 'def' space+ identifier
! private static final Pattern FUNCTION_PATTERN = Pattern.compile("(\\s+|^)(def\\s+)(\\w*)");
//spaces* 'class' space+ identifier
! private static final Pattern CLASS_PATTERN = Pattern.compile("(\\s+|^)(class\\s+)(\\w*)");
|