Skip to content

Commit c7a2fce

Browse files
Stay in the COMMENT_LESSTHAN state, annotate fall-throughs.
1 parent 9e15251 commit c7a2fce

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/nu/validator/htmlparser/impl/Tokenizer.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2924,8 +2924,7 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29242924
continue stateloop;
29252925
case '<':
29262926
appendStrBuf(c);
2927-
state = transition(state, Tokenizer.COMMENT_LESSTHAN, reconsume, pos);
2928-
continue stateloop;
2927+
continue;
29292928
case '-':
29302929
appendStrBuf(c);
29312930
state = transition(state, Tokenizer.COMMENT_END_DASH, reconsume, pos);
@@ -2938,13 +2937,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29382937
continue;
29392938
case '\u0000':
29402939
c = '\uFFFD';
2941-
// fall thru
2940+
// CPPONLY: MOZ_FALLTHROUGH;
29422941
default:
29432942
appendStrBuf(c);
29442943
state = transition(state, Tokenizer.COMMENT, reconsume, pos);
29452944
continue stateloop;
29462945
}
29472946
}
2947+
// CPPONLY: MOZ_FALLTHROUGH;
29482948
case COMMENT_LESSTHAN_BANG:
29492949
for (;;) {
29502950
if (++pos == endPos) {
@@ -2968,13 +2968,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29682968
continue;
29692969
case '\u0000':
29702970
c = '\uFFFD';
2971-
// fall thru
2971+
// CPPONLY: MOZ_FALLTHROUGH;
29722972
default:
29732973
appendStrBuf(c);
29742974
state = transition(state, Tokenizer.COMMENT, reconsume, pos);
29752975
continue stateloop;
29762976
}
29772977
}
2978+
// CPPONLY: MOZ_FALLTHROUGH;
29782979
case COMMENT_LESSTHAN_BANG_DASH:
29792980
for (;;) {
29802981
if (++pos == endPos) {
@@ -2998,13 +2999,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29982999
continue;
29993000
case '\u0000':
30003001
c = '\uFFFD';
3001-
// fall thru
3002+
// CPPONLY: MOZ_FALLTHROUGH;
30023003
default:
30033004
appendStrBuf(c);
30043005
state = transition(state, Tokenizer.COMMENT, reconsume, pos);
30053006
continue stateloop;
30063007
}
30073008
}
3009+
// CPPONLY: MOZ_FALLTHROUGH;
30083010
case COMMENT_LESSTHAN_BANG_DASH_DASH:
30093011
for (;;) {
30103012
if (++pos == endPos) {
@@ -3037,7 +3039,7 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
30373039
continue;
30383040
case '\u0000':
30393041
c = '\uFFFD';
3040-
// fall thru
3042+
// CPPONLY: MOZ_FALLTHROUGH;
30413043
case '!':
30423044
errNestedComment();
30433045
adjustDoubleHyphenAndAppendToStrBufAndErr(c, reportedConsecutiveHyphens);
@@ -3052,6 +3054,7 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
30523054
continue stateloop;
30533055
}
30543056
}
3057+
// CPPONLY: MOZ_FALLTHROUGH;
30553058
// XXX reorder point
30563059
case COMMENT_START_DASH:
30573060
if (++pos == endPos) {

0 commit comments

Comments
 (0)