MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / start

Function start

static/js/codemirror/mode/http/http.js:8–18  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

6 }
7
8 function start(stream, state) {
9 if (stream.match(/^HTTP\/\d\.\d/)) {
10 state.cur = responseStatusCode;
11 return "keyword";
12 } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) {
13 state.cur = requestPath;
14 return "keyword";
15 } else {
16 return failFirstLine(stream, state);
17 }
18 }
19
20 function responseStatusCode(stream, state) {
21 var code = stream.match(/^\d+/);

Callers

nothing calls this directly

Calls 3

failFirstLineFunction · 0.85
matchMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected