/**
* Add the information for a given IFile resource
- *
+ *
*/
public void addFile(IFile fileToParse) {
/**
* Get the next token from input
*/
- private int getNextToken(Scanner scanner) {
- int token;
+ private TokenName getNextToken(Scanner scanner) {
+ TokenName token;
try {
token = scanner.getNextToken();
if (Scanner.DEBUG) {
return token;
} catch (InvalidInputException e) {
}
- return TokenNameERROR;
+ return TokenName.ERROR;
}
private void parseIdentifiers(char[] charArray) {
null, true /* taskCaseSensitive */);
scanner.setSource(charArray);
scanner.setPHPMode(false);
- int token = getNextToken(scanner);
+ TokenName token = getNextToken(scanner);
try {
- while (token != TokenNameEOF) { // && fToken != TokenNameERROR) {
- if (token == TokenNameinclude || token == TokenNameinclude_once
- || token == TokenNamerequire
- || token == TokenNamerequire_once) {
- while (token != TokenNameEOF && token != TokenNameERROR
- && token != TokenNameSEMICOLON
- && token != TokenNameRPAREN
- && token != TokenNameLBRACE
- && token != TokenNameRBRACE) {
+ while (token != TokenName.EOF) { // && fToken != TokenName.ERROR) {
+ if (token == TokenName.INCLUDE || token == TokenName.INCLUDE_ONCE
+ || token == TokenName.REQUIRE
+ || token == TokenName.REQUIRE_ONCE) {
+ while (token != TokenName.EOF && token != TokenName.ERROR
+ && token != TokenName.SEMICOLON
+ && token != TokenName.RPAREN
+ && token != TokenName.LBRACE
+ && token != TokenName.RBRACE) {
token = getNextToken(scanner);
- if (token == TokenNameStringDoubleQuote
- || token == TokenNameStringSingleQuote) {
+ if (token == TokenName.STRINGDOUBLEQUOTE
+ || token == TokenName.STRINGSINGLEQUOTE) {
char[] includeName = scanner
.getCurrentStringLiteralSource();
try {
/**
* Returns a list of includes
- *
+ *
* @return the determined list of includes
*/
public List getList() {
public Set getSet() {
return fSet;
}
-}
\ No newline at end of file
+}