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

Method parse

tools/common/_hyperscript.iife.js:3935–3952  ·  view source on GitHub ↗
(parser, root)

Source from the content-addressed store, hash-verified

3933 this.args = { root };
3934 }
3935 static parse(parser, root) {
3936 var apostrophe = parser.matchOpToken("'");
3937 if (apostrophe || root.type === "symbol" && (root.name === "my" || root.name === "its" || root.name === "your") && (parser.currentToken().type === "IDENTIFIER" || parser.currentToken().type === "ATTRIBUTE_REF" || parser.currentToken().type === "STYLE_REF")) {
3938 if (apostrophe) {
3939 parser.requireToken("s");
3940 }
3941 var attribute, style, prop;
3942 attribute = parser.parseElement("attributeRef");
3943 if (attribute == null) {
3944 style = parser.parseElement("styleRef");
3945 if (style == null) {
3946 prop = parser.requireTokenType("IDENTIFIER");
3947 }
3948 }
3949 var propertyAccess = new _PossessiveExpression(root, attribute || style, prop);
3950 return parser.parseElement("indirectExpression", propertyAccess);
3951 }
3952 }
3953 resolve(context, { root: rootVal }) {
3954 var value;
3955 if (this.attribute) {

Callers

nothing calls this directly

Calls 5

matchOpTokenMethod · 0.45
currentTokenMethod · 0.45
requireTokenMethod · 0.45
parseElementMethod · 0.45
requireTokenTypeMethod · 0.45

Tested by

no test coverage detected