Home
last modified time | relevance | path

Searched refs:token (Results 1 – 25 of 65) sorted by relevance

123

/template/twigstarter/vendor/twig/twig/src/
DExpressionParser.php71 $token = $this->parser->getCurrentToken();
72 …while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $pre…
73 $op = $this->binaryOperators[$token->getValue()];
76 if ('is not' === $token->getValue()) {
78 } elseif ('is' === $token->getValue()) {
85 $expr = new $class($expr, $expr1, $token->getLine());
88 $token = $this->parser->getCurrentToken();
108 $token = $stream->expect(/* Token::NAME_TYPE */ 5);
109 $names = [new AssignNameExpression($token->getValue(), $token->getLine())];
138 $token = $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '(');
[all …]
DParser.php135 $token = $this->stream->next();
136 $rv[] = new TextNode($token->getValue(), $token->getLine());
140 $token = $this->stream->next();
143 $rv[] = new PrintNode($expr, $token->getLine());
148 $token = $this->getCurrentToken();
150 if (/* Token::NAME_TYPE */ 5 !== $token->getType()) {
151 …throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->get…
154 if (null !== $test && $test($token)) {
166 if (!isset($this->handlers[$token->getValue()])) {
168 …$e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this-…
[all …]
DTokenStream.php73 $token = $this->tokens[$this->current];
74 if (!$token->test($type, $value)) {
75 $line = $token->getLine();
78 Token::typeToEnglish($token->getType()),
79 $token->getValue() ? sprintf(' of value "%s"', $token->getValue()) : '',
87 return $token;
/template/strap/vendor/carica/phpcss/src/PhpCss/Parser/
H A DSequence.php33 $token = $this->lookahead(
44 while (isset($token)) {
45 if ($selector = $this->createSelector($token)) {
46 $this->read($token->type);
49 switch ($token->type) {
57 $sequence->simples[] = $this->createPseudoElement($token);
58 $this->read($token->type);
61 $this->read($token->type);
66 $this->read($token->type);
72 $token, $subSequence
[all …]
H A DAttribute.php37 $token = $this->read(Scanner\Token::IDENTIFIER);
38 $attribute = new Ast\Selector\Simple\Attribute($token->content);
39 $token = $this->read(
45 if ($token->type === Scanner\Token::ATTRIBUTE_OPERATOR) {
46 $attribute->match = $this->_operators[$token->content];
47 $token = $this->read(
55 switch ($token->type) {
58 $attribute->literal = new Ast\Value\Literal($token->content);
H A DPseudoClass.php36 $token = $this->read(Scanner\Token::PSEUDO_CLASS);
37 $name = substr($token->content, 1);
124 throw new PhpCss\Exception\UnknownPseudoClassException($token);
168 private function createSelector(Scanner\Token $token) { argument
169 switch ($token->type) {
171 if (FALSE !== strpos($token->content, '|')) {
172 [$prefix, $name] = explode('|', $token->content);
175 $name = $token->content;
182 return new Ast\Selector\Simple\Id(substr($token->content, 1));
184 return new Ast\Selector\Simple\ClassName(substr($token->content, 1));
[all …]
/template/twigstarter/vendor/twig/twig/src/TokenParser/
DEmbedTokenParser.php24 public function parse(Token $token) argument
32 …tToken = $fakeParentToken = new Token(/* Token::STRING_TYPE */ 7, '__parent__', $token->getLine());
34 …ntToken = new Token(/* Token::STRING_TYPE */ 7, $parent->getAttribute('value'), $token->getLine());
36 …arentToken = new Token(/* Token::NAME_TYPE */ 5, $parent->getAttribute('name'), $token->getLine());
41 new Token(/* Token::BLOCK_START_TYPE */ 1, '', $token->getLine()),
42 new Token(/* Token::NAME_TYPE */ 5, 'extends', $token->getLine()),
44 new Token(/* Token::BLOCK_END_TYPE */ 3, '', $token->getLine()),
58 …me(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this-…
61 public function decideBlockEnd(Token $token) argument
63 return $token->test('endembed');
DMacroTokenParser.php29 public function parse(Token $token) argument
31 $lineno = $token->getLine();
40 if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
41 $value = $token->getValue();
55 public function decideBlockEnd(Token $token) argument
57 return $token->test('endmacro');
DIfTokenParser.php33 public function parse(Token $token) argument
35 $lineno = $token->getLine();
73 public function decideIfFork(Token $token) argument
75 return $token->test(['elseif', 'else', 'endif']);
78 public function decideIfEnd(Token $token) argument
80 return $token->test(['endif']);
DBlockTokenParser.php32 public function parse(Token $token) argument
34 $lineno = $token->getLine();
46 if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
47 $value = $token->getValue();
67 public function decideBlockEnd(Token $token) argument
69 return $token->test('endblock');
DSpacelessTokenParser.php31 public function parse(Token $token) argument
34 $lineno = $token->getLine();
45 public function decideSpacelessEnd(Token $token) argument
47 return $token->test('endspaceless');
DWithTokenParser.php24 public function parse(Token $token) argument
41 return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag());
44 public function decideWithEnd(Token $token) argument
46 return $token->test('endwith');
DExtendsTokenParser.php26 public function parse(Token $token) argument
31 …throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceCont…
33 …throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceCont…
37 …throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourc…
/template/strap/vendor/antlr/antlr4-php-runtime/src/
H A DCommonTokenFactory.php70 $token = new CommonToken($type, $source, $channel, $start, $stop);
72 $token->setLine($line);
73 $token->setCharPositionInLine($column);
76 $token->setText($text);
82 $token->setText($source->b->getText($start, $stop));
85 return $token;
90 $token = new CommonToken($type);
92 $token->setText($text);
94 return $token;
H A DLexer.php50 public $token; variable in Antlr\\Antlr4\\Runtime\\Lexer
133 $this->token = null;
168 return $this->token;
175 $this->token = null;
216 if ($this->token === null) {
220 return $this->token;
310 public function emitToken(Token $token) : void argument
312 $this->token = $token;
324 $token = $this->factory->createEx(
335 $this->emitToken($token);
[all …]
H A DParserTraceListener.php24 $token = $stream !== null ? $stream->LT(1) : null;
29 $token === null? '' : $token->getText() ?? ''
45 $token = $stream !== null ? $stream->LT(1) : null;
50 $token === null? '' : $token->getText() ?? ''
/template/strap/vendor/carica/phpcss/src/PhpCss/
H A DScanner.php58 while ($token = $this->_next()) {
59 $target[] = $token;
61 if ($this->_status->isEndToken($token)) {
65 if ($newStatus = $this->_status->getNewStatus($token)) {
89 if (($token = $this->_status->getToken($this->_buffer, $this->_offset)) &&
90 $token->length > 0) {
91 $this->_offset += $token->length;
92 return $token;
H A DParser.php89 foreach($expectedTokens as $token) {
90 if ($this->matchToken(0, $token)) {
142 foreach($expectedTokens as $token) {
143 if ($this->matchToken($position, $token)) {
194 foreach ($expectedTokens as $token) {
195 if ($found = $this->matchToken($position, $token)) {
/template/strap/vendor/carica/phpcss/src/PhpCss/Scanner/Status/Selector/
H A DAttribute.php47 if ($token = $this->matchCharacters($buffer, $offset, $this->_tokenChars)) {
48 return $token;
50 if ($token = $this->matchPatterns($buffer, $offset, $this->_tokenPatterns)) {
51 return $token;
62 public function isEndToken(Scanner\Token $token): bool { argument
63 return $token->type === Scanner\Token::ATTRIBUTE_SELECTOR_END;
72 public function getNewStatus(Scanner\Token $token): ?Scanner\Status { argument
73 switch ($token->type) {
/template/strap/vendor/salesforce/handlebars-php/src/Handlebars/
H A DParser.php53 $token = $tokens->current();
56 if ($token === null) {
59 switch ($token[Tokenizer::TYPE]) {
66 'Unexpected closing tag: /' . $token[Tokenizer::NAME]
72 && $result[Tokenizer::NAME] == $token[Tokenizer::NAME]
75 $result[Tokenizer::END] = $token[Tokenizer::INDEX];
84 array_push($stack, $token);
/template/strap/vendor/carica/phpcss/src/PhpCss/Exception/
H A DUnknownPseudoElementException.php20 public function __construct(PhpCss\Scanner\Token $token) { argument
21 $this->_encounteredToken = $token;
23 $token,
26 $token->content,
27 $token->position
H A DUnknownPseudoClassException.php21 public function __construct(PhpCss\Scanner\Token $token) { argument
23 $token,
26 $token->content,
27 $token->position
/template/strap/vendor/carica/phpcss/src/PhpCss/Scanner/Status/
H A DSelector.php55 if ($token = $this->matchCharacters($buffer, $offset, $this->_tokenChars)) {
56 return $token;
58 if ($token = $this->matchPatterns($buffer, $offset, $this->_tokenPatterns)) {
59 return $token;
70 public function isEndToken(Scanner\Token $token): bool { argument
80 public function getNewStatus(Scanner\Token $token): ?Scanner\Status { argument
81 switch ($token->type) {
/template/strap/ComboStrap/
H A DMarkupRef.php519 $token = substr($queryStringAndAnchorProcessing, 0, $questionMarkPos);
522 $token = $queryStringAndAnchorProcessing;
531 if (preg_match('/^([0-9]+)(?:x([0-9]+))?/', $token, $sizing)) {
536 $token = substr($token, strlen($sizing[0]));
537 if ($token === "") {
546 $found = preg_match('/^(nolink|direct|linkonly|details)/i', $token, $matches);
550 $token = substr($token, strlen($linkingValue));
551 if ($token == "") {
561 $found = preg_match('/^(' . $noCacheValue . ')/i', $token, $matches);
564 $token = substr($token, strlen($noCacheValue));
[all …]
/template/strap/vendor/symfony/polyfill-php80/
H A DPhpToken.php90 foreach ($tokens as $index => $token) {
91 if (\is_string($token)) {
92 $id = \ord($token);
93 $text = $token;
95 [$id, $text, $line] = $token;

123