MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / parseScopedRef

Method parseScopedRef

packages/core/src/constraints/parser.ts:269–289  ·  view source on GitHub ↗
(scopeName: string)

Source from the content-addressed store, hash-verified

267 }
268
269 private parseScopedRef(scopeName: string): ExprNode {
270 this.expect(".");
271 const prop = this.readProp();
272
273 let scope: RefScope;
274 switch (scopeName) {
275 case "parent":
276 scope = { kind: "parent" };
277 break;
278 case "viewport":
279 scope = { kind: "viewport" };
280 break;
281 case "intrinsic":
282 scope = { kind: "intrinsic" };
283 break;
284 default:
285 this.fail(`Unknown scope "${scopeName}"`, this.pos - (scopeName.length + prop.length + 1));
286 }
287
288 return { kind: "ref", scope, prop };
289 }
290
291 private parseWidgetRef(): ExprNode {
292 this.expect("#");

Callers 1

parseNamedAtomMethod · 0.95

Calls 3

expectMethod · 0.95
readPropMethod · 0.95
failMethod · 0.95

Tested by

no test coverage detected