{"id":21811584,"url":"https://github.com/valsov/go-interpreter","last_synced_at":"2025-03-21T09:15:32.422Z","repository":{"id":194957338,"uuid":"691946028","full_name":"valsov/go-interpreter","owner":"valsov","description":"Study on interpreters, implemented in Go","archived":false,"fork":false,"pushed_at":"2024-03-14T20:33:22.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T05:41:33.572Z","etag":null,"topics":["ast","dynamically-typed","repl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valsov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-09-15T08:18:16.000Z","updated_at":"2024-03-26T07:09:54.000Z","dependencies_parsed_at":"2023-10-16T09:52:05.299Z","dependency_job_id":"e7872716-8a49-4b43-9a9d-b69353f3fc4e","html_url":"https://github.com/valsov/go-interpreter","commit_stats":null,"previous_names":["valsov/gointerpreter","valsov/go-interpreter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valsov%2Fgo-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valsov%2Fgo-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valsov%2Fgo-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valsov%2Fgo-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valsov","download_url":"https://codeload.github.com/valsov/go-interpreter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244767798,"owners_count":20507110,"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":["ast","dynamically-typed","repl"],"created_at":"2024-11-27T13:45:31.988Z","updated_at":"2025-03-21T09:15:32.388Z","avatar_url":"https://github.com/valsov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interpreter implemented in Go\nStudy on interpreters, featuring a complete dynamically-typed language. This work is based on the book [Writing An Interpreter In Go, by Thorsten Ball](https://interpreterbook.com/). The project is fully unit-tested.\n\n## Structure of the project\n- `/ast` All available data structures representing the evaluated program\n- `/evaluator` Navigates through the AST in order to evaluate its nodes\n- `/lexer` Produces tokens from chars, it is responsible of syntax checking\n- `/object` Data structures representing the execution results of the AST by the evaluator\n- `/parser` The role of the parser is to produce an AST of the program from tokens\n- `/repl` Read-Eval-Print Loop, which enables direct development in this language\n- `/token` Base representation of the code: a collection of tokens\n\n**Execution flow of the interpreter**:\n\n`string` =[`lexer`]=\u003e `[]token` =[`parser`]=\u003e `ast` =[`evaluator`]=\u003e `stream of objects`\n\n## List of additional features to implement\n### Lexer\n- [x] Support UNICODE + UFT8 encoding instead of only ASCII. This requires switching from `byte` to `rune` reading\n- [x] Allow integers as part of a variable or function name (but only if not solely composed of int chars)\n- [ ] Support ++, --, +=, -=, *=, /=, %=\n- [x] Support modulo\n- [ ] Allow ternary operators\n\n### Parser\n- [ ] indicate source line and col when reporting errors (impacts lexer)\n- [ ] Support else if(...)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalsov%2Fgo-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalsov%2Fgo-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalsov%2Fgo-interpreter/lists"}