{"id":30764455,"url":"https://github.com/ashiven/chogopy","last_synced_at":"2026-05-17T17:10:08.250Z","repository":{"id":310220994,"uuid":"1038463688","full_name":"ashiven/chogopy","owner":"ashiven","description":"A ChocoPy compiler written in Go","archived":false,"fork":false,"pushed_at":"2025-08-31T06:38:12.000Z","size":346,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T07:13:08.259Z","etag":null,"topics":["chocopy","compiler-design","compilers","golang","lexers","llvm","llvm-ir","parsers"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashiven.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-08-15T08:42:52.000Z","updated_at":"2025-08-30T14:22:10.000Z","dependencies_parsed_at":"2025-08-31T07:09:14.590Z","dependency_job_id":"a7adcc85-9707-416e-893d-67f25efe2f92","html_url":"https://github.com/ashiven/chogopy","commit_stats":null,"previous_names":["ashiven/chogopy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ashiven/chogopy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiven%2Fchogopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiven%2Fchogopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiven%2Fchogopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiven%2Fchogopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashiven","download_url":"https://codeload.github.com/ashiven/chogopy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiven%2Fchogopy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273641897,"owners_count":25142248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chocopy","compiler-design","compilers","golang","lexers","llvm","llvm-ir","parsers"],"created_at":"2025-09-04T17:04:59.608Z","updated_at":"2026-05-17T17:10:08.241Z","avatar_url":"https://github.com/ashiven.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch2 align=\"center\"\u003echogopy\u003c/h2\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A \u003cb\u003eChocoPy\u003c/b\u003e compiler written in Go\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Release](https://img.shields.io/github/v/release/ashiven/chogopy)](https://github.com/ashiven/chogopy/releases)\n[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/ashiven/chogopy)](https://github.com/ashiven/chogopy/issues)\n[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/ashiven/chogopy)](https://github.com/ashiven/chogopy/pulls)\n\n\u003c/div\u003e\n\n## About\n\n**chogopy** is a compiler for the [ChocoPy language](https://chocopy.org/) written purely in **Go** as a fun way to learn more about compilers and get better at **Go**.\nIt includes multiple analysis passes that perform type checking, variable scope analysis, and more, and compiles down to LLVM IR for flexibility and platform support.\n\n## Setup\n\n1. Clone the repository.\n\n```bash\ngit clone https://github.com/ashiven/chogopy.git\n```\n\n2. Install LLVM according to [this guide](https://tinygo.org/docs/guides/build/bring-your-own-llvm/).\n\n```bash\necho 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' | sudo tee /etc/apt/sources.list.d/llvm.list\nwget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -\nsudo apt-get update\nsudo apt-get install clang-18 llvm-18-dev lld-18 libclang-18-dev\n```\n\n3. Compile the compiler.\n\n```bash\ngo build -tags=llvm18 -o cgp\n```\n\n## Usage\n\nBy default **ChoGoPy** will run every analysis and transformation pass available to it. You are, however, able to specify the exact\nstages that the compiler should go through by using the following command line flags:\n\n- `-l` to emit only the tokens generated by the lexer.\n- `-p` to parse the given source code and print the resulting AST.\n- `-t` to parse the given source code and perform static type checking on it.\n- `-n` to parse the given source code and perform name scope analysis on it.\n- `-c` to generate LLVM IR from the given source code.\n\nAn exemplary command would look as follows:\n\n```bash\n./cgp -p test.choc\n```\n\n## Contributing\n\nPlease feel free to submit a [pull request](https://github.com/ashiven/chogopy/pulls) or open an [issue](https://github.com/ashiven/chogopy/issues).\n\n1. Fork the repository\n2. Create a new branch: `git checkout -b feature-name`.\n3. Make your changes\n4. Push your branch: `git push origin feature-name`.\n5. Submit a PR\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n---\n\n\u003e GitHub [@ashiven](https://github.com/ashiven) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e Twitter [ashiven\\_](https://twitter.com/ashiven_)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashiven%2Fchogopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashiven%2Fchogopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashiven%2Fchogopy/lists"}