55 |
|
|
56 |
int state = STATE_NORMAL; |
int state = STATE_NORMAL; |
57 |
|
|
58 |
String word=""; |
String word = ""; |
59 |
int lastWordStart=-1; |
int lastWordStart = startIndex; |
60 |
for (; startIndex<endIndex; ++startIndex) { |
for (; startIndex<endIndex; ++startIndex) { |
61 |
if (state==STATE_STARC) { |
if (state==STATE_STARC) { |
62 |
if (startIndex<endIndex-1 && source[startIndex]=='*' && source[startIndex+1]=='/') { |
if (startIndex<endIndex-1 && source[startIndex]=='*' && source[startIndex+1]=='/') { |
74 |
state=STATE_STARC; |
state=STATE_STARC; |
75 |
} |
} |
76 |
else if (source[startIndex]=='=' || source[startIndex]=='(' || source[startIndex]==';') { |
else if (source[startIndex]=='=' || source[startIndex]=='(' || source[startIndex]==';') { |
77 |
return lastWordStart; |
return lastWordStart; |
78 |
} |
} |
79 |
else if (Parser.WHITESPACE.indexOf(source[startIndex])>=0) { |
else if (Parser.WHITESPACE.indexOf(source[startIndex])>=0) { |
80 |
if (word.length()>0 && !word.endsWith(".")) { |
if (word.length()>0 && !word.endsWith(".")) { |
91 |
//throw new Error("In FieldComponent: cannot understand word '"+word+"' (typeName="+typeName+", name="+name()+")"); |
//throw new Error("In FieldComponent: cannot understand word '"+word+"' (typeName="+typeName+", name="+name()+")"); |
92 |
} |
} |
93 |
word=""; |
word=""; |
94 |
lastWordStart=-1; |
lastWordStart=startIndex; |
95 |
} |
} |
96 |
} |
} |
97 |
else { |
else { |