MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / parseHyperScript

Method parseHyperScript

src/core/kernel.js:389–404  ·  view source on GitHub ↗
(tokens)

Source from the content-addressed store, hash-verified

387 }
388
389 parseHyperScript(tokens) {
390 var parser = new Parser(this, tokens);
391 var result;
392 var lastError = null;
393 try {
394 result = parser.parseElement("hyperscript");
395 if (tokens.hasMore()) parser.raiseError();
396 } catch (e) {
397 if (!(e instanceof ParseRecoverySentinel)) throw e;
398 lastError = e.parseError;
399 }
400 if (!result) result = new HyperscriptProgram([]);
401 result.errors = result.collectErrors();
402 if (lastError) result.errors.push(lastError);
403 return result;
404 }
405
406 #syncToFeature(parser) {
407 parser.tokens.clearFollows();

Callers 1

#initElementMethod · 0.45

Calls 4

parseElementMethod · 0.95
raiseErrorMethod · 0.95
hasMoreMethod · 0.45
collectErrorsMethod · 0.45

Tested by

no test coverage detected