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

Method parsePickRange

tools/common/_hyperscript.iife.js:5651–5665  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

5649 }
5650 }
5651 static parsePickRange(parser) {
5652 parser.matchToken("at") || parser.matchToken("from");
5653 var rv = { includeStart: true, includeEnd: false };
5654 rv.from = parser.matchToken("start") ? 0 : parser.requireElement("expression");
5655 if (parser.matchToken("to") || parser.matchOpToken("..")) {
5656 if (parser.matchToken("end")) {
5657 rv.toEnd = true;
5658 } else {
5659 rv.to = parser.requireElement("expression");
5660 }
5661 }
5662 if (parser.matchToken("inclusive")) rv.includeEnd = true;
5663 else if (parser.matchToken("exclusive")) rv.includeStart = false;
5664 return rv;
5665 }
5666 static parseSource(parser) {
5667 if (!parser.matchAnyToken("of", "from")) {
5668 parser.raiseExpected("of", "from");

Callers 1

parseMethod · 0.45

Calls 3

matchTokenMethod · 0.45
requireElementMethod · 0.45
matchOpTokenMethod · 0.45

Tested by

no test coverage detected