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) {
    if (ShapeMapJisonParser.shapes && label in ShapeMapJisonParser.shapes)
      error("Structural error: "+label+" is a shape");
    if (!ShapeMapJisonParser.productions)
      ShapeMapJisonParser.productions = {};
    if (label in ShapeMapJisonParser.productions) {
      if (ShapeMapJisonParser.options.duplicateShape === "replace")
        ShapeMapJisonParser.productions[label] = production;
      else if (ShapeMapJisonParser.options.duplicateShape !== "ignore")
        error("Parse error: "+label+" already defined");
    } else
      ShapeMapJisonParser.productions[label] = production;
  }
function addProduction ( label , production ) { if ( ShapeMapJisonParser . shapes && label in ShapeMapJisonParser . shapes ) error ( "Structural error: " + label + " is a shape" ) ; if ( ! ShapeMapJisonParser . productions ) ShapeMapJisonParser . productions = { } ; if ( label in ShapeMapJisonParser . productions ) { if ( ShapeMapJisonParser . options . duplicateShape === "replace" ) ShapeMapJisonParser . productions [ label ] = production ; else if ( ShapeMapJisonParser . options . duplicateShape !== "ignore" ) error ( "Parse error: " + label + " already defined" ) ; } else ShapeMapJisonParser . productions [ label ] = production ; }
Add a production to the map
Add a production to the map