{"id":37205826,"url":"https://github.com/tomefile/lib-parser","last_synced_at":"2026-01-14T23:42:32.548Z","repository":{"id":322141852,"uuid":"1087781230","full_name":"tomefile/lib-parser","owner":"tomefile","description":"Library to parse Tomefile code and output a node tree for use by another program","archived":false,"fork":false,"pushed_at":"2025-12-18T18:13:12.000Z","size":267,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T08:50:01.643Z","etag":null,"topics":["ast","parser","tome","tomefile"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomefile.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-01T16:24:24.000Z","updated_at":"2025-12-18T18:12:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tomefile/lib-parser","commit_stats":null,"previous_names":["tomefile/lib-parser"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/tomefile/lib-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomefile%2Flib-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomefile%2Flib-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomefile%2Flib-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomefile%2Flib-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomefile","download_url":"https://codeload.github.com/tomefile/lib-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomefile%2Flib-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"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","parser","tome","tomefile"],"created_at":"2026-01-14T23:42:31.873Z","updated_at":"2026-01-14T23:42:32.541Z","avatar_url":"https://github.com/tomefile.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tomefile Parser\n\nLibrary to parse [Tomefile](https://github.com/tomefile) code and output a node tree for use by another program.\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [Features](#features)\n    * [Parsing](#parsing)\n    * [Hooks](#hooks)\n* [Roadmap](#roadmap)\n* [Usage](#usage)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n## Features\n\n### Parsing\n\nParses the input file into a `*libparser.NodeRoot{}` including string segments.\n\n### Hooks\n\nAllow to run custom `libparser.Hook()` functions on `libparser.Node` before it gets appended to the tree. Returns as soon as an error is encountered. Used to validate, discard or modify nodes.\n\n## Roadmap\n\nThings that need to be done before `v1`:\n\n- [x] Save context to Nodes and allow for partial parsing.\n- [ ] Partial parsing\n- [ ] Improve runtime string modifier evaluation (currently it just fails silently)\n- [ ] Multi-line arguments `(...)`\n- [ ] Revisit all of the code and make sure it's well-made (it isn't)\n- [ ] Better test coverage (Add more edge-cases where formatting isn't perfect)\n\n## Usage\n\nParsing a file:\n\n```go\n// Close all files when all parsers have finished.\ndefer libparser.CloseAll()\n\nfile, err := libparser.OpenFile(\"example.tome\")\nif err != nil {\n    panic(err)\n}\n\nparser := libparser.New(file)\nparser.Hooks = []libparser.Hook{\n    libparser.NoShebangHook,  // remove UNIX shebang, e.g. #!/bin/tome\n    libparser.ExcludeHook[*libparser.NodeComment],  // by default, the parser includes ALL file contents, you can discard what's not needed.\n}\n\nif derr := parser.Run(); derr != nil {\n    derr.Print(os.Stderr)\n    os.Exit(1)\n}\n\n// [parser.Result] is [*libparser.NodeTree]\nreturn parser.Result\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomefile%2Flib-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomefile%2Flib-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomefile%2Flib-parser/lists"}