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>
This commit is contained in:
parent
d12a517009
commit
a5236acd7e
25 changed files with 1768 additions and 6 deletions
16
crates/syntax/tests/fixtures/scripts_and_anonymous.snap
vendored
Normal file
16
crates/syntax/tests/fixtures/scripts_and_anonymous.snap
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# outline
|
||||
function greet (string $name): string @5:4-8:5 sel 5:13-5:18
|
||||
class class@anonymous extends Migration implements Countable @18:11-34:1 sel 18:11-18:16
|
||||
method __construct (string $connection) @19:4-21:5 sel 19:20-19:31
|
||||
property $connection string @19:32-19:58 sel 19:47-19:58
|
||||
method up (): void @23:4-28:5 sel 23:20-23:22
|
||||
method count (): int @30:4-33:5 sel 30:20-30:25
|
||||
# folding
|
||||
4:31-9:1
|
||||
6:4-8:5
|
||||
11:32-14:1
|
||||
18:63-34:1
|
||||
20:4-21:5
|
||||
24:4-28:5
|
||||
25:27-27:9
|
||||
31:4-33:5
|
||||
Loading…
Add table
Add a link
Reference in a new issue