private static final int STRING_SQ = 5;
- // private static final int CHARACTER= 4;
+ private static final int STRING_HEREDOC = 6;
// beginning of prefixes and postfixes
private static final int NONE = 0;
private static final int CARRIAGE_RETURN = 6; // postfix for STRING_DQ, CHARACTER and SINGLE_LINE_COMMENT
+// private static final int HEREDOC = 7;
+
/** The scanner. */
private final BufferedDocumentScanner fScanner = new BufferedDocumentScanner(1000); // faster implementation
new Token(PHP_MULTILINE_COMMENT),
new Token(PHP_PHPDOC_COMMENT),
new Token(PHP_STRING_DQ),
- new Token(PHP_STRING_SQ) };
+ new Token(PHP_STRING_SQ),
+ new Token(PHP_STRING_HEREDOC)};
public FastJavaPartitionScanner(boolean emulate) {
fEmulate = emulate;
else if (contentType.equals(PHP_STRING_SQ))
return STRING_SQ;
+
+ else if (contentType.equals(PHP_STRING_HEREDOC))
+ return STRING_HEREDOC;
+
// else if (contentType.equals(JAVA_CHARACTER))
// return CHARACTER;
Contributors:
Igor Malinin - initial contribution
- $Id: PHPPartitionScanner.java,v 1.31 2005-10-09 11:24:07 axelcl Exp $
+ $Id: PHPPartitionScanner.java,v 1.32 2005-10-09 12:35:01 axelcl Exp $
**********************************************************************/
package net.sourceforge.phpeclipse.phpeditor.php;
if (position >= end) {
return false;
}
- if (pos==heredocIdent.length) {
+ if (pos == heredocIdent.length) {
return true;
}
ch = document.getChar(position++); // ignore escaped character
}
pos++;
}
- } else if (ch == '"') {
- return true;
}
}
} catch (BadLocationException e) {