lastOffset = lastKeyword = i1;
lastOffset = lastKeyword = i;
	public byte markTokensImpl(byte token, Segment line, int lineIndex)	{		char[] array = line.array;		int offset = line.offset;		lastOffset = offset;		lastKeyword = offset;		int length = line.count + offset;		boolean backslash = false;loop:		for(int i = offset; i < length; i++)		{			int i1 = (i+1);			char c = array[i];			if(c == '\\')			{				backslash = !backslash;				continue;			}			switch(token)			{			case Token.NULL:				switch(c)				{				case '#':					if(backslash)						backslash = false;					else					{						doKeyword(line,i,c);						addToken(i - lastOffset,token);						addToken(length - i,Token.COMMENT1);						lastOffset = lastKeyword = length;						break loop;					}					break;				case '"':					doKeyword(line,i,c);					if(backslash)						backslash = false;					else					{						addToken(i - lastOffset,token);						if(SyntaxUtilities.regionMatches(false,							line,i1,"\"\""))						{							token = TRIPLEQUOTE1;						}						else						{							token = Token.LITERAL1;						}						lastOffset = lastKeyword = i;					}					break;				case '\'':					doKeyword(line,i,c);					if(backslash)						backslash = false;					else					{						addToken(i - lastOffset,token);						if(SyntaxUtilities.regionMatches(false,							line,i1,"''"))						{							token = TRIPLEQUOTE2;						}						else						{							token = Token.LITERAL2;						}						lastOffset = lastKeyword = i;					}					break;				default:					backslash = false;					if(!Character.isLetterOrDigit(c)						&& c != '_')						doKeyword(line,i,c);					break;				}				break;			case Token.LITERAL1:				if(backslash)					backslash = false;				else if(c == '"')				{					addToken(i1 - lastOffset,token);					token = Token.NULL;					lastOffset = lastKeyword = i1;				}				break;			case Token.LITERAL2:				if(backslash)					backslash = false;				else if(c == '\'')				{					addToken(i1 - lastOffset,Token.LITERAL1);					token = Token.NULL;					lastOffset = lastKeyword = i1;				}				break;			case TRIPLEQUOTE1:				if(backslash)					backslash = false;				else if(SyntaxUtilities.regionMatches(false,					line,i,"\"\"\""))				{					addToken((i+=4) - lastOffset,						Token.LITERAL1);					token = Token.NULL;					lastOffset = lastKeyword = i1;				}				break;			case TRIPLEQUOTE2:				if(backslash)					backslash = false;				else if(SyntaxUtilities.regionMatches(false,					line,i,"'''"))				{					addToken((i+=4) - lastOffset,						Token.LITERAL1);					token = Token.NULL;					lastOffset = lastKeyword = i1;				}				break;			default:				throw new InternalError("Invalid state: "					+ token);			}		}		switch(token)		{			case TRIPLEQUOTE1:			case TRIPLEQUOTE2:				addToken(length - lastOffset,Token.LITERAL1);				break;			case Token.NULL:				doKeyword(line,length,'\0');			default:				addToken(length - lastOffset,token);				break;		}		return token;	}