Home
last modified time | relevance | path

Searched defs:code (Results 1 – 25 of 27) sorted by relevance

12

/PHP-Parser/lib/PhpParser/Lexer/TokenEmulator/
H A DAttributeEmulator.php13 public function isEmulationNeeded(string $code): bool {
17 public function emulate(string $code, array $tokens): array {
34 public function reverseEmulate(string $code, array $tokens): array {
39 public function preprocessCode(string $code, array &$patches): string {
H A DTokenEmulator.php12 abstract public function isEmulationNeeded(string $code): bool;
18 abstract public function emulate(string $code, array $tokens): array;
24 abstract public function reverseEmulate(string $code, array $tokens): array;
27 public function preprocessCode(string $code, array &$patches): string {
H A DReverseEmulator.php22 public function isEmulationNeeded(string $code): bool {
26 public function emulate(string $code, array $tokens): array {
30 public function reverseEmulate(string $code, array $tokens): array {
34 public function preprocessCode(string $code, array &$patches): string {
H A DNullsafeTokenEmulator.php13 public function isEmulationNeeded(string $code): bool {
17 public function emulate(string $code, array $tokens): array {
56 public function reverseEmulate(string $code, array $tokens): array {
H A DExplicitOctalEmulator.php13 public function isEmulationNeeded(string $code): bool {
17 public function emulate(string $code, array $tokens): array {
41 public function reverseEmulate(string $code, array $tokens): array {
H A DKeywordEmulator.php11 public function isEmulationNeeded(string $code): bool {
25 public function emulate(string $code, array $tokens): array {
50 public function reverseEmulate(string $code, array $tokens): array {
H A DAsymmetricVisibilityTokenEmulator.php12 public function isEmulationNeeded(string $code): bool {
19 public function emulate(string $code, array $tokens): array {
44 public function reverseEmulate(string $code, array $tokens): array {
H A DReadonlyFunctionTokenEmulator.php27 public function reverseEmulate(string $code, array $tokens): array {
/PHP-Parser/grammar/
H A DphpyLang.php22 function preprocessGrammar($code) {
31 function resolveNodes($code) {
54 function resolveMacros($code) {
139 function resolveStackAccess($code) {
145 function removeTrailingWhitespace($code) {
H A DrebuildParsers.php75 function replaceIfBlocks(string $code, array $defines): string {
/PHP-Parser/bin/
H A Dphp-parse41 $code = file_get_contents('php://stdin'); variable
44 $code = $file; variable
52 $code = file_get_contents($file); variable
96 function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) {
/PHP-Parser/lib/PhpParser/
H A DError.php104 public function getStartColumn(string $code): int {
117 public function getEndColumn(string $code): int {
132 public function getMessageWithColumnInfo(string $code): string {
148 private function toColumn(string $code, int $pos): int {
H A DParser.php16 public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array;
H A DNodeDumper.php19 private ?string $code; variable in PhpParser\\NodeDumper
60 public function dump($node, ?string $code = null): string {
287 private function toColumn(string $code, int $pos): int {
H A DLexer.php24 public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array {
/PHP-Parser/test/PhpParser/
H A DLexerTest.php16 public function testError($code, $messages): void {
58 public function testLex($code, $expectedTokens): void {
H A DCodeParsingTest.php12 public function testParse($name, $code, $expected, $modeLine): void {
29 public function getParseOutput(Parser $parser, $code, array $modes) {
57 private function formatErrorMessage(Error $e, $code) {
H A DPrettyPrinterTest.php31 protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) {
40 public function testPrettyPrint($name, $code, $expected, $mode): void {
47 public function testPrettyPrintFile($name, $code, $expected, $mode): void {
191 …public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine): void…
224 public function testRoundTripPrint($name, $code, $expected, $modeLine): void {
H A DParserTestAbstract.php121 public function testExtraAttributes($code, $expectedAttributes): void {
208 public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array {
H A DCodeTestParser.php6 public function parseTest($code, $chunksPerTest) {
H A DErrorTest.php43 public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColumn): void {
/PHP-Parser/test/PhpParser/Lexer/
H A DEmulativeTest.php135 public function testLexNewFeatures(string $code, array $expectedTokens): void {
143 public function testLeaveStuffAloneInStrings(string $code): void {
159 public function testErrorAfterEmulation($code): void {
433 … public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens): void {
/PHP-Parser/test_old/
H A Drun.php86 $codeExtractor = function($file, $code) {
94 $codeExtractor = function($file, $code) {
191 $code = $prettyPrinter->printFormatPreserving($stmts, $origStmts, $origTokens); variable
204 $code = "<?php\n" . $prettyPrinter->prettyPrint($stmts); variable
/PHP-Parser/lib/PhpParser/Internal/
H A DTokenPolyfill.php124 public static function tokenize(string $code, int $flags = 0): array {
/PHP-Parser/test/PhpParser/NodeVisitor/
H A DNameResolverTest.php569 private function parseAndResolve(string $code): array {

Completed in 24 milliseconds

12