{"id":23486812,"url":"https://github.com/tomlin7/lemon","last_synced_at":"2025-04-15T01:28:27.697Z","repository":{"id":114466837,"uuid":"455041287","full_name":"tomlin7/lemon","owner":"tomlin7","description":"The Lemon Programming Language. Minimalist, fast, dynamic.","archived":false,"fork":false,"pushed_at":"2025-01-23T12:32:43.000Z","size":217,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T13:21:21.643Z","etag":null,"topics":["cinnamon","hacktoberfest","interpter","programming-language"],"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/tomlin7.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":"2022-02-03T05:28:04.000Z","updated_at":"2025-02-21T15:42:33.000Z","dependencies_parsed_at":"2024-12-23T10:19:17.928Z","dependency_job_id":"88514592-e3ab-4409-be2e-d6cdccd02e0a","html_url":"https://github.com/tomlin7/lemon","commit_stats":null,"previous_names":["tomlin7/cinnamon","tomlin7/lemon"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Flemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Flemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Flemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Flemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomlin7","download_url":"https://codeload.github.com/tomlin7/lemon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248988222,"owners_count":21194385,"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":["cinnamon","hacktoberfest","interpter","programming-language"],"created_at":"2024-12-24T22:17:21.906Z","updated_at":"2025-04-15T01:28:27.691Z","avatar_url":"https://github.com/tomlin7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Lemon Programming Language\n\nLemon is a tiny, fast, interpreted language. This repository contains the source code for the Lemon interpreter, written in Go. The language is still in development, and the interpreter is not yet feature-complete. A peek at the REPL atm:\n\n![repl](.github/image.png)\n\n## Hello, Lemon!\n\n```js\nlet message = \"Hello, Lemon!\";\nprint(message);\n```\n\nFor more examples, check out the [examples](./examples) directory.\n\n```js\nlet fibonacci = fn(x) {\n  if (x == 0) {\n    0\n  } else {\n    if (x == 1) {\n      return 1;\n    } else {\n      fibonacci(x - 1) + fibonacci(x - 2);\n    }\n  }\n};\nlet map = fn(arr, f) {\n  let iter = fn(arr, accumulated) {\n    if (len(arr) == 0) {\n      accumulated\n    } else {\n      iter(rest(arr), push(accumulated, f(first(arr))));\n    }\n  };\n  iter(arr, []);\n};\nlet numbers = [ 1, 1 + 1, 4 - 1, 2 * 2, 2 + 3, 12 / 2 ];\nmap(numbers, fibonacci);\n// =\u003e returns: [1, 1, 2, 3, 5, 8]\n```\n\n## Features\n\n- [x] Data types: boolean, integer and string\n- [x] Variables `let name = value;`\n- [x] Arithmetic operations (`+`, `-`, `*`, `/`)\n- [x] Logical operations (`!`, `\u0026\u0026`, `||`)\n- [x] Functions `fn (args) { body }`\n- [x] First-class functions (closures)\n- [x] Comparison operations (`==`, `!=`, `\u003e`, `\u003e=`, `\u003c`, `\u003c=`)\n- [ ] Control structures\n  - [x] if, else `if (condition) { body } else { body }`\n  - [ ] else if branch\n  - [ ] switch, case\n  - [ ] match, when\n  - [ ] while, for, loop\n  - [ ] break, continue\n- [x] Garbage collection\n- [x] Strings `let name = \"value\";`\n- [x] String concatenation `\"value\" + \"value\";`\n- [x] Arrays `[1, 2, 3]`\n- [x] Hash maps `{ \"key\": \"value\" }`\n- [ ] Comments\n- [ ] Error handling\n- [ ] Standard library\n- [ ] Modules\n- [ ] Classes\n- [ ] Generics\n- [ ] Multithreading\n\n## Usage\n\nTo run the REPL, use the following command:\n\n```bash\ngo run main.go\n```\n\nTo build the interpreter, use the following command:\n\n```bash\ngo build\n```\n\nRunning [lemon files](./example.mm) (after building):\n\n```bash\nlemon example.mm\n```\n\nTo run tests, use the following command:\n\n```bash\ngo test \u003cdirectory\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomlin7%2Flemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomlin7%2Flemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomlin7%2Flemon/lists"}