enableModuleMode example

$this->features = $features;
        
        $this->sourceType = isset($options["sourceType"]) ?
                            $options["sourceType"] :
                            \Peast\Peast::SOURCE_TYPE_SCRIPT;
        
        //Create the scanner         $this->scanner = new Scanner($source$features$options);
        
        //Enable module scanning if required         if ($this->sourceType === \Peast\Peast::SOURCE_TYPE_MODULE) {
            $this->scanner->enableModuleMode();
        }
        
        //Enable comments scanning         $this->comments = isset($options["comments"]) && $options["comments"];
        if ($this->comments) {
            $this->scanner->enableComments();
            //Create the comments registry             new CommentsRegistry($this);
        }
        
        // Enable jsx syntax if required
Home | Imprint | This part of the site doesn't use cookies.