{"id":37064950,"url":"https://github.com/jay51/pjscript","last_synced_at":"2026-01-14T07:35:53.724Z","repository":{"id":52695798,"uuid":"257458950","full_name":"jay51/pjscript","owner":"jay51","description":"JS like, single file simple language written in python ","archived":false,"fork":false,"pushed_at":"2021-04-20T19:58:24.000Z","size":219,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T01:52:50.698Z","etag":null,"topics":["interpreter","js","learning","lexer","parser","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pjscript/","language":"Python","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/jay51.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}},"created_at":"2020-04-21T02:27:39.000Z","updated_at":"2023-01-04T23:51:15.000Z","dependencies_parsed_at":"2022-08-22T06:40:52.912Z","dependency_job_id":null,"html_url":"https://github.com/jay51/pjscript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jay51/pjscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay51%2Fpjscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay51%2Fpjscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay51%2Fpjscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay51%2Fpjscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jay51","download_url":"https://codeload.github.com/jay51/pjscript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay51%2Fpjscript/sbom","scorecard":{"id":508761,"data":{"date":"2025-08-11","repo":{"name":"github.com/jay51/pjscript","commit":"5348e687a5abfe640b447efbc7848b0f19bc428b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T23:57:25.189Z","repository_id":52695798,"created_at":"2025-08-19T23:57:25.189Z","updated_at":"2025-08-19T23:57:25.189Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"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":["interpreter","js","learning","lexer","parser","python"],"created_at":"2026-01-14T07:35:53.023Z","updated_at":"2026-01-14T07:35:53.716Z","avatar_url":"https://github.com/jay51.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A single file, dependency free language written in python. The goal of this project is to show that\nprogramming languages are not a black box and that you could learn the basic concpets required to implement your own language.\nWhile this language is not a real programming language however a lot of the internal concepts displayed in this\nlanguage is taken from other real programming languages.\n\n### how to Run\n```py\npython -m pjscript \u003cfile.js\u003e\n\n#or you could use the lexer, parser and interpreter in your python file\n\nfrom pjcript import *\n\nlexer = Lexer(\"var x = 1;\")\ntree = Parser(lexer)\ninterpreter = Interpreter(tree)\ninterpreter.interpret()\n```\n\n### Data types:\n    - Int (positive \u0026 negitive)\n    - String\n    - Array\n    - Object\n    - Null\n\n\n### Basic statemnets\n```js\n/* this is a comment */\nvar age = 2;\nvar name = \"jack\";\nvar newage = age;\nname = \"jack and me\";\nlog(1, \"it's working fuck yea\", name);\nvar x = add(age, add(2,3));\nlog(x);\n```\n\n\n### Functions and Scope\n\n```js\nvar x = \"hello world\";\n\nfunction printme(st1, st2, st3){\n    log(st1);\n    log(st2);\n    log(st3);\n};\n\nfunction testfunc(){\n    var x = \"new thing\";\n    printme(x, 1, 3);\n};\n\ntestfunc();\nlog(x);\n```\n\n### Expressions\n```js\nvar x = 0 + add(2, 3);\nvar x = x + add(2, 3);\nvar x = (x * 2) / 2;\nlog(x); /* should log 10*/\n\nfunction Mul(){\n    return add(2, add(2 * 3, 2));\n};\n\nvar result = Mul();\nlog(result);\n\n\n/* post-increment and decrement */\nvar x = 2;\nlog(\"x: \", x);\n\nvar y = x++ * 2;\nlog(\"y: \", y); /* output y: 4 */\nlog(\"x: \", x); /* output y: 3 */\n\n/* pre-increment and decrement */\nvar x = 2;\nlog(\"x: \", x);\n\nvar y = ++x * 2;\nlog(\"y: \", y);/* output y: 6 */\nlog(\"x: \", x);/* output y: 3 */\n\n\n/* Comparison Operators */\n\nvar x = 2;\nvar y = x \u003e= 2;\nlog(\"y: \", y); /* True */\nlog(\"x: \", x); /* 2 */\n```\n\n### For Loops\n\n```js\nfor(var i = 0; i \u003c 5; i++){\n    log(i);\n};\n\n/* or */\nvar i = 0;\nfor(i = 2; i \u003c 5; i++){\n    log(i);\n};\n\n/* infinite loop */\nvar i = 0;\nfor(; ; i++){\n    log(i);\n};\n```\n\n### IF ELSE\n\n```js\nvar x = 0;\nif(x == 3){\n    log(\"if\");\n\n} else if(x == 2){\n    log(\"else if\");\n\n} else if (x == 1){\n    log(\"else if second\");\n\n}else{\n    log(\"else\");\n};\n\nvar y = 2;\nif (x == 2){\n    log(\"if only\");\n};\n\nfor(var i = 0; i \u003c 5; i++){\n    if(i == 3){\n        log(i);\n    };\n};\n\n```\n\n### Array\n```js\n// numbers\nvar numbers = [1, 2, 3];\nlog(numbers);\nlog(numbers[2]);\n\n\n// Strings\nvar person = [\"jack\", \"jay\", \"nick\"];\nfor(var i = 0; i \u003c 3; i++){\n    log(person[i]);\n};\n```\n\n### Object\n```js\n// Object\nvar person = {\n    name: \"jack\",\n    age: 23\n};\n\nlog(person.name);\nlog(person.age);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay51%2Fpjscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjay51%2Fpjscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay51%2Fpjscript/lists"}