%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/losik.varak.net/vendor/nette/neon/src/Neon/
Upload File :
Create Path :
Current File : /www/varak.net/losik.varak.net/vendor/nette/neon/src/Neon/Decoder.php

<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */

declare(strict_types=1);

namespace Nette\Neon;


/**
 * Parser for Nette Object Notation.
 * @internal
 */
final class Decoder
{
	/**
	 * Decodes a NEON string.
	 * @return mixed
	 */
	public function decode(string $input)
	{
		$node = $this->parseToNode($input);
		return $node->toValue();
	}


	public function parseToNode(string $input): Node
	{
		$lexer = new Lexer;
		$parser = new Parser;
		$tokens = $lexer->tokenize($input);
		return $parser->parse($tokens);
	}
}

Zerion Mini Shell 1.0