Skip to content

Commit 4496c90

Browse files
Stay in the COMMENT_LESSTHAN state, annotate fall-throughs.
1 parent b50d611 commit 4496c90

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
@@ -2853,8 +2853,7 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
28532853
continue stateloop;
28542854
case '<':
28552855
appendStrBuf(c);
2856-
state = transition(state, Tokenizer.COMMENT_LESSTHAN, reconsume, pos);
2857-
continue stateloop;
2856+
continue;
28582857
case '-':
28592858
appendStrBuf(c);
28602859
state = transition(state, Tokenizer.COMMENT_END_DASH, reconsume, pos);
@@ -2867,13 +2866,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
28672866
continue;
28682867
case '\u0000':
28692868
c = '\uFFFD';
2870-
// fall thru
2869+
// CPPONLY: MOZ_FALLTHROUGH;
28712870
default:
28722871
appendStrBuf(c);
28732872
state = transition(state, Tokenizer.COMMENT, reconsume, pos);
28742873
continue stateloop;
28752874
}
28762875
}
2876+
// CPPONLY: MOZ_FALLTHROUGH;
28772877
case COMMENT_LESSTHAN_BANG:
28782878
for (;;) {
28792879
if (++pos == endPos) {
@@ -2897,13 +2897,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
28972897
continue;
28982898
case '\u0000':
28992899
c = '\uFFFD';
2900-
// fall thru
2900+
// CPPONLY: MOZ_FALLTHROUGH;
29012901
default:
29022902
appendStrBuf(c);
29032903
state = transition(state, Tokenizer.COMMENT, reconsume, pos);
29042904
continue stateloop;
29052905
}
29062906
}
2907+
// CPPONLY: MOZ_FALLTHROUGH;
29072908
case COMMENT_LESSTHAN_BANG_DASH:
29082909
for (;;) {
29092910
if (++pos == endPos) {
@@ -2927,13 +2928,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29272928
continue;
29282929
case '\u0000':
29292930
c = '\uFFFD';
2930-
// fall thru
2931+
// CPPONLY: MOZ_FALLTHROUGH;
29312932
default:
29322933
appendStrBuf(c);
29332934
state = transition(state, Tokenizer.COMMENT, reconsume, pos);
29342935
continue stateloop;
29352936
}
29362937
}
2938+
// CPPONLY: MOZ_FALLTHROUGH;
29372939
case COMMENT_LESSTHAN_BANG_DASH_DASH:
29382940
for (;;) {
29392941
if (++pos == endPos) {
@@ -2966,7 +2968,7 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29662968
continue;
29672969
case '\u0000':
29682970
c = '\uFFFD';
2969-
// fall thru
2971+
// CPPONLY: MOZ_FALLTHROUGH;
29702972
case '!':
29712973
errNestedComment();
29722974
adjustDoubleHyphenAndAppendToStrBufAndErr(c, reportedConsecutiveHyphens);
@@ -2981,6 +2983,7 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
29812983
continue stateloop;
29822984
}
29832985
}
2986+
// CPPONLY: MOZ_FALLTHROUGH;
29842987
// XXX reorder point
29852988
case COMMENT_START_DASH:
29862989
if (++pos == endPos) {

0 commit comments

Comments
 (0)