packages/extension-map/doc/webpacks/shexmap-webapp.js
// Add a production to the map
Add a production to the map
Add a production to the map
function addProduction (label, production, yy) {
    if (ShExJisonParser.shapes && label in ShExJisonParser.shapes)
      error(new Error("Structural error: "+label+" is a shape expression"), yy);
    if (!ShExJisonParser.productions)
      ShExJisonParser.productions = {};
    if (label in ShExJisonParser.productions) {
      if (ShExJisonParser.options.duplicateShape === "replace")
        ShExJisonParser.productions[label] = production;
      else if (ShExJisonParser.options.duplicateShape !== "ignore")
        error(new Error("Parse error: "+label+" already defined"), yy);
    } else
      ShExJisonParser.productions[label] = production;
  }
function addProduction ( label , production , yy ) { if ( ShExJisonParser . shapes && label in ShExJisonParser . shapes ) error ( new Error ( "Structural error: " + label + " is a shape expression" ) , yy ) ; if ( ! ShExJisonParser . productions ) ShExJisonParser . productions = { } ; if ( label in ShExJisonParser . productions ) { if ( ShExJisonParser . options . duplicateShape === "replace" ) ShExJisonParser . productions [ label ] = production ; else if ( ShExJisonParser . options . duplicateShape !== "ignore" ) error ( new Error ( "Parse error: " + label + " already defined" ) , yy ) ; } else ShExJisonParser . productions [ label ] = production ; }
Add a production to the map
Add a production to the map