aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
commit5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch)
tree39a1a4629749056191c05dfd899f931701b7acf3 /srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser
parent5afd237bbd22028b85532b8c0b3fcead49a00764 (diff)
downloadft_server-master.tar.gz
ft_server-master.tar.bz2
ft_server-master.zip
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser')
-rw-r--r--srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser/Trans.php88
1 files changed, 0 insertions, 88 deletions
diff --git a/srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser/Trans.php b/srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser/Trans.php
deleted file mode 100644
index 4d4f600..0000000
--- a/srcs/phpmyadmin/vendor/twig/extensions/lib/Twig/Extensions/TokenParser/Trans.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/*
- * This file is part of Twig.
- *
- * (c) 2010 Fabien Potencier
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-class Twig_Extensions_TokenParser_Trans extends Twig_TokenParser
-{
- /**
- * {@inheritdoc}
- */
- public function parse(Twig_Token $token)
- {
- $lineno = $token->getLine();
- $stream = $this->parser->getStream();
- $count = null;
- $plural = null;
- $notes = null;
-
- if (!$stream->test(Twig_Token::BLOCK_END_TYPE)) {
- $body = $this->parser->getExpressionParser()->parseExpression();
- } else {
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
- $body = $this->parser->subparse(array($this, 'decideForFork'));
- $next = $stream->next()->getValue();
-
- if ('plural' === $next) {
- $count = $this->parser->getExpressionParser()->parseExpression();
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
- $plural = $this->parser->subparse(array($this, 'decideForFork'));
-
- if ('notes' === $stream->next()->getValue()) {
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
- $notes = $this->parser->subparse(array($this, 'decideForEnd'), true);
- }
- } elseif ('notes' === $next) {
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
- $notes = $this->parser->subparse(array($this, 'decideForEnd'), true);
- }
- }
-
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
-
- $this->checkTransString($body, $lineno);
-
- return new Twig_Extensions_Node_Trans($body, $plural, $count, $notes, $lineno, $this->getTag());
- }
-
- public function decideForFork(Twig_Token $token)
- {
- return $token->test(array('plural', 'notes', 'endtrans'));
- }
-
- public function decideForEnd(Twig_Token $token)
- {
- return $token->test('endtrans');
- }
-
- /**
- * {@inheritdoc}
- */
- public function getTag()
- {
- return 'trans';
- }
-
- protected function checkTransString(Twig_Node $body, $lineno)
- {
- foreach ($body as $i => $node) {
- if (
- $node instanceof Twig_Node_Text
- ||
- ($node instanceof Twig_Node_Print && $node->getNode('expr') instanceof Twig_Node_Expression_Name)
- ) {
- continue;
- }
-
- throw new Twig_Error_Syntax(sprintf('The text to be translated with "trans" can only contain references to simple variables'), $lineno);
- }
- }
-}
-
-class_alias('Twig_Extensions_TokenParser_Trans', 'Twig\Extensions\TokenParser\TransTokenParser', false);