MCPcopy
hub / github.com/inikulin/parse5 / _stateScriptData

Method _stateScriptData

packages/parse5/lib/tokenizer/index.ts:1009–1028  ·  view source on GitHub ↗
(cp: number)

Source from the content-addressed store, hash-verified

1007 // Script data state
1008 //------------------------------------------------------------------
1009 protected _stateScriptData(cp: number): void {
1010 switch (cp) {
1011 case $.LESS_THAN_SIGN: {
1012 this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;
1013 break;
1014 }
1015 case $.NULL: {
1016 this._err(ERR.unexpectedNullCharacter);
1017 this._emitChars(REPLACEMENT_CHARACTER);
1018 break;
1019 }
1020 case $.EOF: {
1021 this._emitEOFToken();
1022 break;
1023 }
1024 default: {
1025 this._emitCodePoint(cp);
1026 }
1027 }
1028 }
1029
1030 // PLAINTEXT state
1031 //------------------------------------------------------------------

Calls 4

_errMethod · 0.95
_emitCharsMethod · 0.95
_emitEOFTokenMethod · 0.95
_emitCodePointMethod · 0.95

Tested by

no test coverage detected