Compiles the node.

@param \Zicht\Tool\Script\Buffer $buffer
@return void
170488
public function compile(Buffer $buffer)
    {
        /** @var Script\Annotation[] $annotations */
        $annotations = array();
        $nodes = $this->nodes;
        while (current($nodes) instanceof Script\Annotation) {
            $annotations[] = array_shift($nodes);
        }

        foreach ($annotations as $annotation) {
            $annotation->beforeScript($buffer);
        }

        if (count($this->nodes)) {
            $buffer->write('$z->cmd(');
            foreach ($nodes as $i => $node) {
                if ($i > 0) {
                    $buffer->raw(' . ');
                }
                $buffer->raw('$z->str(');
                $node->compile($buffer);
                $buffer->raw(')');
            }
            $buffer->raw(');')->eol();
        }

        foreach (array_reverse($annotations) as $annotation) {
            $annotation->afterScript($buffer);
        }
    }
1357256
public function compile($path)
	{
		$contents = $this->compileString($this->files->get($path));

		if ( ! is_null($this->cachePath))
		{
			$this->files->put($this->getCompiledPath($path), $contents);
		}
	}
1015190
public function compile(Compiler $compiler)
    {
        $compiler->raw('[');
        $this->compileArguments($compiler);
        $compiler->raw(']');
    }
661499
protected function _compilePayload(& $transport) {
        parent :: _compilePayload($transport);
        $body = array ();
        $cacheManager = $transport->xpdo->getCacheManager();
        if ($cacheManager) {
            if (isset($this->payload['object'])) {
                $object = $this->payload['object'];
                $fileSource = $object['source'];
                $scriptName = basename($fileSource, '.php');
                $body['source'] = $transport->signature . '/' . str_replace('\\', '/', $this->payload['class']) . '/' . $this->payload['signature'] . '.' . $scriptName . '.script';
                $fileTarget = $transport->path . $body['source'];
                $body = array_merge($object, $body);
                if (!$cacheManager->copyFile($fileSource, $fileTarget)) {
                    $transport->xpdo->log(xPDO::LOG_LEVEL_ERROR, "Source file {$fileSource} is missing or {$fileTarget} could not be written");
                    $body = null;
                }

            }
        }
        if (!empty($body)) {
            $this->payload['object'] = $body;
        }
    }
1150458
public function register(Node\NodeInterface $node)
	{
		if ( ! in_array($node, $this->array, true)) {
			$this->array[] = $node;
		}
	}
655662
public function apply(AbstractNode $node)
    {
        /** @var \PHPMD\Node\ClassNode $node */
        $methods = $node->getMethods();
        foreach ($methods as $method) {
            if (strtolower($method->getName()) !== '__construct') {
                continue;
            }

            $this->check($method, $node);
        }
    }
1076523
function it_compiles_nodes($node)
    {
        $node->compile($this)->will(function ($args) {
            $args[0]->write('echo $message');
        });

        $this->compile($node)->getSource()->shouldMatch('/\Recho \$message/');
    }
654075
protected function createSortableBuffer(&$buffer)
    {
        $query = static::query()
            ->select([
                'parent' => $this->getRoleField('tree-parent'),
                'max_value' => QueryExpression::max($this->getRoleField('sort-index'))
            ])->groupBy([
                $this->getRoleField('tree-parent'),
            ])->execute();
        while ($row = $query->fetch()) {
            $buffer['rows'][$row['parent']] = $row['max_value'];
        }
    }
264228
public function appendProtocolHeader(Buffer $buffer)
    {
        $buffer->append('AMQP');
        $buffer->appendUint8(0);
        $buffer->appendUint8(0);
        $buffer->appendUint8(9);
        $buffer->appendUint8(1);
    }
170463
public void __setBuffer(StringBuilder buffer) {
        if (null != __caller) ((TextBuilder) __caller).__setBuffer(buffer);
        else __buffer = buffer;
    }
1171136
public function compile(Compiler $compiler)
    {
        $compiler->addDebugInfo($this);
        $compiler->write('$object = ')->subcompile($this->getNode('object'))->raw(';' . PHP_EOL);

        $layout = $this->getNode('layout');
        if ($layout) {
            $compiler->write('$layout = ')->subcompile($layout)->raw(';' . PHP_EOL);
        } else {
            $compiler->write('$layout = null;' . PHP_EOL);
        }

        $context = $this->getNode('context');
        if ($context) {
            $compiler->write('$attributes = ')->subcompile($context)->raw(';' . PHP_EOL);
        } else {
            $compiler->write('$attributes = null;' . PHP_EOL);
        }

        $compiler
            ->write('$html = $object->render($layout, $attributes ?? []);' . PHP_EOL)
            ->write('$block = $context[\'block\'] ?? null;' . PHP_EOL)
            ->write('if ($block instanceof \Grav\Framework\ContentBlock\ContentBlock && $html instanceof \Grav\Framework\ContentBlock\ContentBlock) {' . PHP_EOL)
            ->indent()
            ->write('$block->addBlock($html);' . PHP_EOL)
            ->write('echo $html->getToken();' . PHP_EOL)
            ->outdent()
            ->write('} else {' . PHP_EOL)
            ->indent()
            ->write('echo (string)$html;' . PHP_EOL)
            ->outdent()
            ->write('}' . PHP_EOL)
        ;
    }
308781
public function Set( $Buffer )
		{
			$this->Buffer   = $Buffer;
			$this->Length   = StrLen( $Buffer );
			$this->Position = 0;
		}
27352
public function compile(Compiler $compiler): void
    {
        $compiler
            ->addDebugInfo($this)
            ->write(sprintf('$this->env->getExtension(\'%s\')', $this->extension))
            ->raw(PHP_EOL)
            ->indent()
        ;

        $this->compileTags($compiler);

        $compiler
            ->outdent()
            ->raw(';'.PHP_EOL)
        ;
    }
451102
public function compile(Compiler $compiler): void
    {
        $name = $this->getAttribute('name');
        $tagClass = $this->getAttribute('tagClass');
        $position = $this->getAttribute('position');

        $compiler
            ->addDebugInfo($this)
            ->write(sprintf('$this->env->getExtension(\'%s\')->addTag(new \%s(', $this->extension, $tagClass))
            ->raw('\Fxp\Component\RequireAsset\Twig\Tag\Renderer\InlineTagRendererUtils::renderBody(')
            ->raw(sprintf('array($this, \'%s\')', $name))
            ->raw(', ')->raw('$context')
            ->raw(', ')->raw('$blocks')
            ->raw(', ')->repr($this->getTemplateLine())
            ->raw(', ')->repr($this->getTemplateName())
            ->raw(')')
            ->raw(', ')->repr($position)
            ->raw(', ')->repr($this->getTemplateLine())
            ->raw(', ')->repr($this->getTemplateName())
            ->raw('));'.PHP_EOL)
        ;
    }
1139254
protected function bufferize($char)
    {
        $buffer = $this->getBuffer();
        $buffer[] = $char;
        $this->setBuffer($buffer);
    }
184752
public function compile()
    {
        if (null !== $this->parameterBag) {
            $blocks = $this->getCoreBlocks();
            $blocks = array_merge($blocks, $this->getThirdPartyBlocks());
            foreach ($blocks as $block) {
                $this->prepareBlock($block);
            }
        }

        Config::read($this);

        parent::compile();
    }
795690
public function load($buffer){
        $this->fin = ord($buffer[0]) >> 7;
        $this->opcode = ord($buffer[0]) & (pow(2,4)-1);
        $this->mask = ord($buffer[1]) >> 7;
        if($this->isCtlFrame()) return ;
        
        $this->payload_len = ord($buffer[1]) & 127;
        
        $ext_bytes = 0;
        if($this->payload_len < 126) {
            $this->payload_ext_len = 0;
        }elseif($this->payload_len === 126 ) {
            $this->payload_ext_len = unpack('n', substr($buffer,2,2));
            $ext_bytes=2;
        }else if($this->payload_len === 127) {
            $this->payload_ext_len = unpack('J', substr($buffer,2,8));
            $ext_bytes=8;
        }        
        
        if($this->mask) {
            $this->mask_key = substr($buffer, $ext_bytes+2, 4);
            $data = substr($buffer, $ext_bytes+6);
            for ($index = 0; $index < strlen($data); $index++) {
                $this->body .= $data[$index] ^ $this->mask_key[$index % 4];
            }
            
        }else{
            $this->mask_key = '';
            $this->body = substr($buffer, $ext_bytes+2);
        }
    }