command
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Sep 3, 2025
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Basic Parsing Example
This example demonstrates how to use the PHP parser to parse PHP code and examine the resulting AST.
What it does
- Takes a sample PHP code string containing variables, functions, and classes
- Creates a lexer and parser instance
- Parses the code into an Abstract Syntax Tree (AST)
- Displays basic information about the parsed statements
- Shows the full AST structure
Running the example
cd examples/basic-parsing
go run main.go
Expected output
The program will display:
- Number of parsed statements
- A list of each statement type
- The complete AST structure in string format
This is the foundation for more complex PHP code analysis tasks.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.