Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/fastparser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27516/src/org/python/pydev/parser/fastparser
Modified Files:
FastDefinitionsParser.java
Log Message:
Checking line and column on definitions parser
Index: FastDefinitionsParser.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastDefinitionsParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FastDefinitionsParser.java 2 Jul 2008 20:18:53 -0000 1.2
--- FastDefinitionsParser.java 2 Jul 2008 20:38:39 -0000 1.3
***************
*** 56,60 ****
* The current column
*/
! private int col = 1;
/**
--- 56,60 ----
* The current column
*/
! private int col;
/**
***************
*** 90,93 ****
--- 90,99 ----
/**
+ * Should we debug?
+ */
+ private final static boolean DEBUG = false;
+
+
+ /**
* Constructor
*
***************
*** 115,118 ****
--- 121,127 ----
case '\'':
case '"':
+ if(DEBUG){
+ System.out.println("literal");
+ }
//go to the end of the literal
currIndex = ParsingUtils.getLiteralEnd(cs, currIndex, c);
***************
*** 122,125 ****
--- 131,137 ----
case '#':
+ if(DEBUG){
+ System.out.println("comment");
+ }
//go to the end of the comment
currIndex++;
***************
*** 171,174 ****
--- 183,189 ----
+ /**
+ * Called when a new line is found. Tries to make the match of function and class definitions.
+ */
private void handleNewLine() {
if(currIndex >= length-1){
***************
*** 176,181 ****
}
! col = 0;
row ++;
lineBuffer.clear();
char c = cs[currIndex];
--- 191,200 ----
}
! col = 1;
row ++;
+ if(DEBUG){
+ System.out.println("Handling new line:"+row);
+ }
+
lineBuffer.clear();
char c = cs[currIndex];
***************
*** 202,205 ****
--- 221,225 ----
startMethod(getNextIdentifier(c), row, startMethodCol);
}
+ currIndex --;
}
|