{"id":25416667,"url":"https://github.com/tariqs26/st","last_synced_at":"2026-05-09T04:31:27.244Z","repository":{"id":248030478,"uuid":"827548136","full_name":"tariqs26/st","owner":"tariqs26","description":"Interpreted language with a JavaScript-like syntax","archived":false,"fork":false,"pushed_at":"2026-04-06T04:39:02.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T06:07:02.866Z","etag":null,"topics":["ast","bun","bun-test","interpreter","lexer","parser","programming-language","repl","scope","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tariqs26.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":"2024-07-11T21:47:21.000Z","updated_at":"2026-04-06T04:39:05.000Z","dependencies_parsed_at":"2025-01-23T06:26:03.086Z","dependency_job_id":"6565da9f-cc01-43de-8861-d0148714b418","html_url":"https://github.com/tariqs26/st","commit_stats":null,"previous_names":["tariqs26/st"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tariqs26/st","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tariqs26%2Fst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tariqs26%2Fst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tariqs26%2Fst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tariqs26%2Fst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tariqs26","download_url":"https://codeload.github.com/tariqs26/st/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tariqs26%2Fst/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["ast","bun","bun-test","interpreter","lexer","parser","programming-language","repl","scope","typescript"],"created_at":"2025-02-16T16:56:05.521Z","updated_at":"2026-05-09T04:31:27.222Z","avatar_url":"https://github.com/tariqs26.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eST Language\u003c/h1\u003e\n\nAn interpreted language with a JavaScript-like syntax, written in [Typescript](https://www.typescriptlang.org/). It features a lexer, ast, parser, interpreter, REPL and file runner.\n\n\u003ch2\u003eTable of Contents\u003c/h2\u003e\n\n- [Syntax and Features](#syntax-and-features)\n  - [Data Types](#data-types)\n  - [Expressions](#expressions)\n    - [Unary](#unary)\n    - [Binary](#binary)\n    - [Assignment](#assignment)\n    - [Member Access](#member-access)\n      - [Computed](#computed)\n      - [Object With Identifier](#object-with-identifier)\n      - [Type Specific Built-in Properties](#type-specific-built-in-properties)\n    - [Function Call](#function-call)\n  - [Statements](#statements)\n    - [Variable Declaration](#variable-declaration)\n    - [Control Flow](#control-flow)\n      - [If-Else](#if-else)\n      - [For Loop](#for-loop)\n      - [While Loop](#while-loop)\n    - [Function Declaration](#function-declaration)\n  - [Comments](#comments)\n  - [Native Functions](#native-functions)\n- [Installation](#installation)\n- [Available Scripts](#available-scripts)\n- [Usage](#usage)\n- [Roadmap](#roadmap)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n\n## Syntax and Features\n\n### Data Types\n\n- Number `3`, `3.14`\n- String `\"Hello, World!\"`\n- Boolean `true`, `false`\n- Null `null`\n- Array `[1, 2, 3]`\n- Object `{ key: \"value\" }`\n\n### Expressions\n\n#### Unary\n\n- Logical `!`\n- Negation `-`\n- Positive `+`\n\n#### Binary\n\n- Multiplicative `(*, /, //, %)`\n- Additive `(+, -)`\n- Relational `(==, !=, \u003c, \u003c=, \u003e, \u003e=)`\n- Logical `(\u0026\u0026, ||)`\n\n#### Assignment\n\n```rs\nx = 3\n```\n\n#### Member Access\n\n##### Computed\n\n```rs\nfoo[0]\nfoo[3 + 4]\nfoo[\"bar\"]\n```\n\n##### Object With Identifier\n\n```rs\nfoo.bar\n```\n\n##### Type Specific Built-in Properties\n\n```rs\nconst foo = []\n\nfoo.length\nfoo.push(3)\n```\n\n#### Function Call\n\n```rs\nadd(3, 4)\n```\n\n### Statements\n\n#### Variable Declaration\n\n```rs\nconst PI = 3\nlet bar = \"Hello, World!\"\n```\n\n#### Control Flow\n\n##### If-Else\n\nlimited to if-else for now, parentheses are optional\n\n```rs\nif 3 \u003e 2 {\n  print(\"3 is greater than 2\")\n} else {\n  print(\"foo\")\n}\n```\n\n##### For Loop\n\n```rs\nfor let i = 0; i \u003c 10; i = i + 1 {\n  print(i)\n}\n```\n\n##### While Loop\n\n```rs\nlet i = 0\n\nwhile i \u003c 10 {\n  print(i)\n  i = i + 1\n}\n```\n\n#### Function Declaration\n\nFunction declarations support both closures and recursion.\n\n```rs\nfn fib(n) {\n  if n \u003c= 1 {\n    return n\n  }\n\n  return fib(n - 1) + fib(n - 2)\n}\n```\n\n### Comments\n\n```py\n# this is a comment\n```\n\n### Native Functions\n\n```rs\nprint(\"Hello, World!\")\nconst name = input(\"What is your name?\")\nrandom()\nrandom(1, 10)\ntypeof(3)\n```\n\n## Installation\n\nEnsure you have [Bun](https://bun.sh/) (v1.1.x or higher) installed.\n\n```bash\nbun install\n```\n\n## Available Scripts\n\n| Command           | Description  |\n| ----------------- | ------------ |\n| `bun lint`        | Lint         |\n| `bun test`        | Test         |\n| `bun run repl`    | Run the REPL |\n| `bun file \u003cfile\u003e` | Run a file   |\n\n## Usage\n\nExample file `program.st`:\n\n```rs\nfn add(a, b) {\n  let sum = a + b\n  return sum\n}\n\nlet result = add(3, 4)\n\nconst foo = {\n  result: result / 3,\n  add,\n  isBar: 1 \u003e 2 || 3 \u003c 4,\n}\n\nif foo[\"is\" + \"Bar\"] {\n  print(\"foo is bar\")\n} else {\n  print(\"foo is not bar\")\n}\n\nprint(foo.result)\nprint(foo.add(3, 4))\n\nfor let i = 0; i \u003c 10; i = i + 1 {\n  print(i)\n}\n\nfn counter() {\n  let count = 0\n  fn increment() {\n    count = count + 1\n    return count\n  }\n  return increment\n}\n\nconst increment = counter()\n\nwhile increment() \u003c 10 {\n  print(increment())\n}\n```\n\nRun file: `bun file program.st`\n\n## Roadmap\n\n- [ ] Control Flow (elif)\n- [ ] Update expressions (++, --) postfix/prefix and (+=, -=, ...)\n- [ ] Error handling (try-catch, throw)\n- [ ] Better error messages with line numbers, context, etc.\n- [ ] OOP\n- [ ] Types\n- [ ] Standard library\n- [ ] Modules\n- [ ] Improve REPL, add history, autocomplete, etc.\n- [ ] Syntax highlighting (VSCode extension)\n- [ ] Rewrite in Rust\n\n## Contributing\n\n1. Fork the project\n2. Create your feature branch (`git checkout -b fix/tokenizer-number-parsing`)\n3. Commit your changes (`git commit -m 'fix: parsing numbers'`)\n4. Push to the branch (`git push origin fix/tokenizer`)\n5. Open a PR\n\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n## Acknowledgements\n\n- \u003chttps://www.youtube.com/playlist?list=PL_2VhOvlMk4UHGqYCLWc6GO8FaPl8fQTh\u003e\n- \u003chttps://astexplorer.net/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftariqs26%2Fst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftariqs26%2Fst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftariqs26%2Fst/lists"}