{"id":36334509,"url":"https://github.com/mck89/peast","last_synced_at":"2026-01-11T12:04:13.802Z","repository":{"id":45283815,"uuid":"63525026","full_name":"mck89/peast","owner":"mck89","description":"JavaScript parser written in PHP that generates AST from your code according to ECMAScript specification","archived":false,"fork":false,"pushed_at":"2025-10-10T12:53:42.000Z","size":1834,"stargazers_count":188,"open_issues_count":1,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-05T18:23:26.321Z","etag":null,"topics":["ast-generation","ecmascript","javascipt","javascript","parser","parsing","php","syntax-tree","tokenizer","traverse","validator"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mck89.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-17T09:50:42.000Z","updated_at":"2025-12-28T23:50:50.000Z","dependencies_parsed_at":"2024-01-11T18:09:01.344Z","dependency_job_id":"88dd5238-6a97-47ca-8cf6-83b80162cffe","html_url":"https://github.com/mck89/peast","commit_stats":{"total_commits":758,"total_committers":11,"mean_commits":68.9090909090909,"dds":"0.15699208443271773","last_synced_commit":"2791b08ffcc1862fe18eef85675da3aa58c406fe"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/mck89/peast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mck89%2Fpeast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mck89%2Fpeast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mck89%2Fpeast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mck89%2Fpeast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mck89","download_url":"https://codeload.github.com/mck89/peast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mck89%2Fpeast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28302184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast-generation","ecmascript","javascipt","javascript","parser","parsing","php","syntax-tree","tokenizer","traverse","validator"],"created_at":"2026-01-11T12:04:13.280Z","updated_at":"2026-01-11T12:04:13.797Z","avatar_url":"https://github.com/mck89.png","language":"PHP","readme":"Peast\n==========\n\n[![Latest Stable Version](https://poser.pugx.org/mck89/peast/v/stable)](https://packagist.org/packages/mck89/peast)\n[![Total Downloads](https://poser.pugx.org/mck89/peast/downloads)](https://packagist.org/packages/mck89/peast)\n[![License](https://poser.pugx.org/mck89/peast/license)](https://packagist.org/packages/mck89/peast)\n[![Build Status](https://github.com/mck89/peast/actions/workflows/test.yml/badge.svg)](https://github.com/mck89/peast/actions/workflows/test.yml)\n\n\n**Peast** _(PHP ECMAScript Abstract Syntax Tree)_ is a PHP 5.4+ library that parses JavaScript code, according to [ECMAScript specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm), and generates an abstract syntax tree following the [ESTree standard](https://github.com/estree/estree).\n\nInstallation\n-------------\nInclude the following requirement to your composer.json:\n```json\n{\n\t\"require\": {\n\t\t\"mck89/peast\": \"dev-master\"\n\t}\n}\n```\n\nRun `composer install` to install the package.\n\nThen in your script include the autoloader and you can start using Peast:\n\n```php\nrequire_once \"vendor/autoload.php\";\n\n$source = \"var a = 1\"; // Your JavaScript code\n$ast = Peast\\Peast::latest($source, $options)-\u003eparse(); // Parse it!\n```\n\nKnown issues\n-------------\nWhen Xdebug is enabled and Peast is used to scan code that contains deeply nested functions, this fatal error can appear:\n```\nPHP Fatal error:  Maximum function nesting level of '512' reached, aborting!\n```\nor\n```\nPHP Warning:  Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames\n```\nTo prevent this you can set `xdebug.max_nesting_level` to a higher value, such as 512.\n\nDocumentation\n-------------\nRead the documentation for more examples and explanations:\n\n 1. [AST generation and tokenization](doc/ast-and-tokenization.md)\n 2. [Tree Traversing](doc/tree-traversing.md)\n 3. [Querying By Selector](doc/querying-by-selector.md)\n 4. [Rendering](doc/rendering.md)\n\n[Changelog](doc/changelog.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmck89%2Fpeast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmck89%2Fpeast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmck89%2Fpeast/lists"}