packages/pegjs/lib/parser.js
function createNode( type, details ) {

          const node = new ast.Node( type, location() );
          if ( details === null ) return node;

          util.extend( node, details );
          return util.enforceFastProperties( node );

      }
function createNode( type, details ) {

          const node = new ast.Node( type, location() );
          if ( details === null ) return node;

          util.extend( node, details );
          return util.enforceFastProperties( node );

      }
function createNode ( type , details ) { const node = new ast . Node ( type , location ( ) ) ; if ( details === null ) return node ; util . extend ( node , details ) ; return util . enforceFastProperties ( node ) ; }
Helper to construct a new AST Node
Helper to construct a new AST Node