MCPcopy
hub / github.com/digitalbazaar/jsonld.js / const_

Function const_

tests/webidl/WebIDLParser.js:415–442  ·  view source on GitHub ↗
(store)

Source from the content-addressed store, hash-verified

413 };
414
415 var const_ = function(store) {
416 all_ws(store, "pea");
417 if (!consume(ID, "const")) return;
418 var ret = { type: "const", nullable: false };
419 all_ws();
420 var typ = primitive_type();
421 if (!typ) {
422 typ = consume(ID) || error("No type for const");
423 typ = typ.value;
424 }
425 ret.idlType = typ;
426 all_ws();
427 if (consume(OTHER, "?")) {
428 ret.nullable = true;
429 all_ws();
430 }
431 var name = consume(ID) || error("No name for const");
432 ret.name = name.value;
433 all_ws();
434 consume(OTHER, "=") || error("No value assignment for const");
435 all_ws();
436 var cnt = const_value();
437 if (cnt) ret.value = cnt;
438 else error("No value for const");
439 all_ws();
440 consume(OTHER, ";") || error("Unterminated const");
441 return ret;
442 };
443
444 var inheritance = function() {
445 all_ws();

Callers 2

interface_Function · 0.85
exceptionFunction · 0.85

Calls 5

all_wsFunction · 0.85
consumeFunction · 0.85
primitive_typeFunction · 0.85
errorFunction · 0.85
const_valueFunction · 0.85

Tested by

no test coverage detected