Lines Matching refs:code

25     private $code;  variable in Twig\\Lexer
159 $this->code = str_replace(["\r\n", "\r"], "\n", $source->getCode());
162 $this->end = \strlen($this->code);
170 … preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, \PREG_OFFSET_CAPTURE);
213 $this->pushToken(/* Token::TEXT_TYPE */ 0, substr($this->code, $this->cursor));
229 $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor);
252 … if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) {
256 … } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) {
276 …if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $thi…
287 …if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this-…
299 if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) {
308 if ('=' === $this->code[$this->cursor] && '>' === $this->code[$this->cursor + 1]) {
313 elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) {
318 elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) {
323 elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0, $this->cursor)) {
332 elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) {
334 if (false !== strpos('([{', $this->code[$this->cursor])) {
335 $this->brackets[] = [$this->code[$this->cursor], $this->lineno];
338 elseif (false !== strpos(')]}', $this->code[$this->cursor])) {
340 …throw new SyntaxError(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $thi…
344 if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) {
349 $this->pushToken(/* Token::PUNCTUATION_TYPE */ 9, $this->code[$this->cursor]);
353 elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) {
358 elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
365 …throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->li…
371 …if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->…
375 $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
395 …if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->c…
399 … $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]);
404 … if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) {
409 …} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen…
412 } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
414 if ('"' != $this->code[$this->cursor]) {
422 …throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->li…
429 …=== $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->…