{"id":26455037,"url":"https://github.com/basemax/goscript","last_synced_at":"2025-03-18T20:29:45.602Z","repository":{"id":282728548,"uuid":"947793199","full_name":"BaseMax/GoScript","owner":"BaseMax","description":"GoScript is a lightweight scripting language implemented in Go. It provides a simple, expressive syntax for common scripting tasks and serves as an excellent platform for learning language design and building domain-specific languages.","archived":false,"fork":false,"pushed_at":"2025-03-13T18:10:41.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T16:14:23.215Z","etag":null,"topics":["go","go-interpreter","go-programming-language","golang","golang-interpreter","interpreter","interpreter-basic","interpreter-go","interpreter-language","interpreter-pattern","programming-language","programming-language-design","programming-language-development","programming-language-go","programming-language-translator","programming-languages"],"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/BaseMax.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":"2025-03-13T09:02:40.000Z","updated_at":"2025-03-13T18:12:36.000Z","dependencies_parsed_at":"2025-03-16T23:00:21.193Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/GoScript","commit_stats":null,"previous_names":["basemax/goscript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGoScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGoScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGoScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGoScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/GoScript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244300918,"owners_count":20430839,"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","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":["go","go-interpreter","go-programming-language","golang","golang-interpreter","interpreter","interpreter-basic","interpreter-go","interpreter-language","interpreter-pattern","programming-language","programming-language-design","programming-language-development","programming-language-go","programming-language-translator","programming-languages"],"created_at":"2025-03-18T20:29:44.938Z","updated_at":"2025-03-18T20:29:45.583Z","avatar_url":"https://github.com/BaseMax.png","language":"Go","readme":"# GoScript\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nGoScript is a lightweight scripting language implemented in Go. It provides a simple, expressive syntax for common scripting tasks and serves as an excellent platform for learning language design and building domain-specific languages.\n\n## Features\n\n- **Interpreted Scripting:** Write and execute scripts without a separate compilation step.\n- **Simple Syntax:** Clean and intuitive syntax for arithmetic, logic, conditionals, loops, functions, and more.\n- **Modular Design:** Easily extend or integrate new features thanks to the well-organized code structure.\n- **Cross-Platform:** Built in Go, GoScript can run on any platform that supports Go.\n\n## Syntax\n\n**Hello World:**\n\n```\nprint(\"Hey World!\")\n```\n\n**Fibonacci:**\n\n```\nfn f(n) {\n    if n \u003c= 1 { 1 }\n    n * f(n-1)\n}\n\nprintln(f(5))\n```\n\n## Getting Started\n\n### Prerequisites\n\n- [Go](https://golang.org/dl/) Tested on 1.22.4\n\n### Installation\n\nClone the repository:\n\n```bash\ngit clone https://github.com/BaseMax/GoScript.git\ncd GoScript\n```\n\nBuild the project:\n\n```bash\ngo build -o goscript\nor\ngo build -o goscript.exe\n```\n\nAlternatively, you can run it directly with:\n\n```bash\ngo run goscript.go\n```\n\n### Running a Script\n\nAfter building the executable, you can run a GoScript file by providing its path as an argument:\n\n```bash\n./goscript.exe path/to/your/script.gos\n```\n\nFor example, to run one of the provided examples:\n\n```bash\n./goscript.exe examples/hello.gos\n```\n\n## Project Structure\n\n```bash\nGoScript/\n├── .gitignore           # Git ignore file\n├── evaluator.go         # Evaluator: Executes the AST nodes\n├── examples/            # Example GoScript programs\n├── go.mod               # Go module file\n├── goscript.exe         # Compiled executable (Windows)\n├── lexer.go             # Lexer: Tokenizes the source code\n├── LICENSE              # MIT License file\n├── goscript.go          # Entry point of the interpreter\n└── parser.go            # Parser: Builds the AST from tokens\n```\n\n## Contributing\n\nContributions to GoScript are welcome! If you have ideas for improvements, new features, or bug fixes, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bugfix.\n- Commit your changes with clear messages.\n- Open a pull request describing your changes.\n- Feel free to open issues for any bugs or feature requests.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Copyright\n\n© 2025 Max Base (Seyyed Ali Mohammadiyeh)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fgoscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fgoscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fgoscript/lists"}