basic-parsing

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 3 Imported by: 0

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

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL