import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
-import junit.framework.Assert;
+import net.sourceforge.phpdt.internal.corext.Assert;
public class PHPParserTokenManager implements PHPParserConstants
{
+ // CommonTokenAction: use the begins/ends fields added to the Jack
+ // CharStream class to set corresponding fields in each Token (which was
+ // also extended with new fields). By default Jack doesn't supply absolute
+ // offsets, just line/column offsets
+ static void CommonTokenAction(Token t) {
+ t.sourceStart = input_stream.beginOffset;
+ t.sourceEnd = input_stream.endOffset;
+ }
public static java.io.PrintStream debugStream = System.out;
public static void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
static private final int jjStopAtPos(int pos, int kind)
jjmatchedKind = 0;
matchedToken = jjFillToken();
matchedToken.specialToken = specialToken;
+ CommonTokenAction(matchedToken);
return matchedToken;
}
image = null;
TokenLexicalActions(matchedToken);
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
+ CommonTokenAction(matchedToken);
return matchedToken;
}
else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)