Lines Matching refs:code
24 $code = '<?php ' . $keyword;
28 new Token(0, "\0", 1, \strlen($code)),
29 ], $lexer->tokenize($code));
37 $code = '<?php ' . strtoupper($keyword);
42 new Token(0, "\0", 1, \strlen($code)),
43 ], $lexer->tokenize($code));
51 $code = '<?php ->' . $keyword;
57 new Token(0, "\0", 1, \strlen($code)),
58 ], $lexer->tokenize($code));
66 $code = '<?php -> ' . $keyword;
73 new Token(0, "\0", 1, \strlen($code)),
74 ], $lexer->tokenize($code));
82 $code = '<?php ?->' . $keyword;
88 new Token(0, "\0", 1, \strlen($code)),
89 ], $lexer->tokenize($code));
135 public function testLexNewFeatures(string $code, array $expectedTokens): void { argument
137 $this->assertSameTokens($expectedTokens, $lexer->tokenize('<?php ' . $code));
143 public function testLeaveStuffAloneInStrings(string $code): void { argument
144 $stringifiedToken = '"' . addcslashes($code, '"\\') . '"';
159 public function testErrorAfterEmulation($code): void { argument
162 $lexer->tokenize('<?php ' . $code . "\0", $errorHandler);
171 $expPos = strlen('<?php ' . $code);
172 $expLine = 1 + substr_count('<?php ' . $code, "\n");
433 … public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens): void { argument
435 $this->assertSameTokens($expectedTokens, $lexer->tokenize('<?php ' . $code));