Lutra/crates/syntax/tests/fixtures/braced_namespaces.snap
danny a5236acd7e M2.1: tree-sitter PHP in crates/syntax
Parser (parse, incremental reparse from lutra_text edits), outline with
UTF-16 ranges and short signatures, folding ranges, 8 MiB parse cap.
Snapshot tests for five PHP 8.3 fixtures, proptests (random bytes,
reparse equals fresh parse, undo round trip), ignored release timing
test. Docs: architecture Syntax section, parity evidence, G4 note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:06:21 +02:00

36 lines
1.4 KiB
Text

# outline
namespace Shop\Catalog @4:0-51:1 sel 4:10-4:22
interface Sellable extends \Stringable, \Countable @7:4-12:5 sel 7:14-7:22
constant CURRENCY string @9:8-9:45 sel 9:28-9:36
method price (): Price @11:8-11:39 sel 11:24-11:29
class Product implements Sellable @14:4-50:5 sel 14:16-14:23
property $tags array @16:22-16:32 sel 16:22-16:27
property $notes array @16:34-16:45 sel 16:34-16:40
method __construct (int $id, ?string $title, array &$cache, string $unused) @18:8-24:9 sel 18:24-18:35
property $id int @19:12-19:35 sel 19:32-19:35
property $title ?string @20:12-20:43 sel 20:30-20:36
property $cache array @21:12-21:38 sel 21:27-21:33
method find (int $id): ?Product @26:8-29:9 sel 26:24-26:28
method tagged (string ...$tags): static @31:8-34:9 sel 31:31-31:37
method price (): Price @36:8-39:9 sel 36:24-36:29
method __toString (): string @41:8-44:9 sel 41:24-41:34
method count (): int @46:8-49:9 sel 46:24-46:29
namespace Shop\Orders @53:0-60:1 sel 53:10-53:21
function total (array $lines, float $vat): float @54:4-57:5 sel 54:13-54:18
constant MAX_LINES @59:10-59:25 sel 59:10-59:19
constant MIN_LINES @59:27-59:40 sel 59:27-59:36
function bootstrap (): void @63:4-65:5 sel 63:13-63:22
# folding
4:23-51:1
8:4-12:5
15:4-50:5
23:10-24:9
27:8-29:9
32:8-34:9
37:8-39:9
42:8-44:9
47:8-49:9
53:22-60:1
55:4-57:5
62:10-66:1
64:4-65:5