{"id":42966875,"url":"https://github.com/pixilcode/js-subset-interpreter","last_synced_at":"2026-01-31T00:02:42.241Z","repository":{"id":220035639,"uuid":"750589599","full_name":"pixilcode/js-subset-interpreter","owner":"pixilcode","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-07T19:11:49.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T20:25:02.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","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/pixilcode.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,"zenodo":null}},"created_at":"2024-01-30T23:27:06.000Z","updated_at":"2025-05-07T19:11:54.000Z","dependencies_parsed_at":"2025-05-07T20:35:10.592Z","dependency_job_id":null,"html_url":"https://github.com/pixilcode/js-subset-interpreter","commit_stats":null,"previous_names":["pixilcode/cs330_js_interpreter_ocaml","pixilcode/js-subset-interpreter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pixilcode/js-subset-interpreter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Fjs-subset-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Fjs-subset-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Fjs-subset-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Fjs-subset-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixilcode","download_url":"https://codeload.github.com/pixilcode/js-subset-interpreter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Fjs-subset-interpreter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28923751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-31T00:02:41.493Z","updated_at":"2026-01-31T00:02:42.237Z","avatar_url":"https://github.com/pixilcode.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript Interpreter\n\n## System Requirements\n* Install OCaml\n  * [Unix and macOS](https://ocaml.org/docs/installing-ocaml#installation-on-unix-and-macos)\n  * [Windows](https://ocaml.org/docs/installing-ocaml#installation-on-windows)\n* Install `dune`\n  * `opam install dune`\n* Install `acorn`\n  * `npm install -g acorn` (`-g` implies that it will be installed globally,\n    excluding `-g` will install it locally)\n\n\n## Running the parser\n\nFor a file containing JavaScript code, let's say `foo.js`, run the following:\n\n```bash\nacorn --ecma2024 foo.js | dune exec print_ast\n```\n\n\n## Running the interpreter\n\nFor a file containing JavaScript code, let's say `foo.js`, run the following:\n\n```bash\nacorn --ecma2024 foo.js | dune exec interpret\n```\n\n\n## JavaScript Subset\n\nThis interpreter interprets a subset of JavaScript including:\n- booleans (`true`, `false`)\n- numbers (`1`, `2.3`)\n- unary operators\n  - boolean (`!`)\n  - number (`+`, `-`)\n- binary operators\n  - relational (`==`, `\u003c`)\n  - arithmetic (`+`, `-`, `*`, `/`)\n  - logical (`\u0026\u0026`, `||`)\n- conditional expressions (`true ? 1 : 2`)\n- variable declaration (`let x = 1;`)\n- variable reassignment expression (`x = 2`)\n- single-argument function expressions (`function (x) { return x }`)\n- single-argument function calls (`foo(1)`)\n\nFor more details, see `test/test_js_print_ast.ml` and `test/test_js_interpret.ml`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixilcode%2Fjs-subset-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixilcode%2Fjs-subset-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixilcode%2Fjs-subset-interpreter/lists"}