{"id":19895385,"url":"https://github.com/razshare/olang-old","last_synced_at":"2025-06-18T02:37:35.274Z","repository":{"id":110248639,"uuid":"569894949","full_name":"razshare/olang-old","owner":"razshare","description":"Experimental frontend for WASI and other targets (mainly PHP).","archived":false,"fork":false,"pushed_at":"2023-03-03T18:01:17.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T11:18:24.071Z","etag":null,"topics":["ast","frontend","parser","php","webassembly"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/razshare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-11-23T21:33:52.000Z","updated_at":"2023-06-06T22:31:07.000Z","dependencies_parsed_at":"2023-05-06T15:32:01.431Z","dependency_job_id":null,"html_url":"https://github.com/razshare/olang-old","commit_stats":null,"previous_names":["razshare/olang-old","tncrazvan/olang-old"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/razshare/olang-old","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Folang-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Folang-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Folang-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Folang-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razshare","download_url":"https://codeload.github.com/razshare/olang-old/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Folang-old/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260475937,"owners_count":23014943,"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","frontend","parser","php","webassembly"],"created_at":"2024-11-12T18:36:33.283Z","updated_at":"2025-06-18T02:37:30.255Z","avatar_url":"https://github.com/razshare.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Syntax showcase\n\n```olang\n\n// this is a struct\nstruct user {\n    username: string = \"test\"\n    email: string    = \"asd\"\n    phone: string    = \"awerqw\"\n    \n    // this is a struct callable (function), it returns bool\n    is_admin =\u003e bool {\n        // logic goes here\n    }\n}\n\n// this is a callable, it takes 2 strings and returns a bool\nvalidate =\u003e bool {\n    email: string = \"my@email.com\"\n    phone: string = \"111111\"\n\n    // validation logic\n    \n}\n\n// calling a callable, parameters must always be named\nvalidate(email: \"some@email.com\", phone: \"22222\")\n\n// this is an if expression\nif 1 \u003e 2 {\n    // some comment\n    return 1\n}\n\n// if else expression\nif 2 \u003e 1 {\n    // then\n} else {\n    // else\n}\n\n\n// and nested\nif 2 \u003e 1 {\n    // then\n} else {\n    // else\n    if 3 === 3 {\n    }\n}\n\nif 2 \u003e 1 {\n    // then\n} else if 3 === 3 {\n    // else if\n}\n\n// due to how the parser works, this is also allowed\nif 2 \u003e 1 {\n    // then\n} else =\u003e if 3 === 3 {\n    // else if\n}\n\n// a few more interesting examples\n\nif 1 \u003e 2 =\u003e validate(email: \"some.other@email.com\", phone: \"33333333\")\nelse if 1 \u003e 2 =\u003e false\n\n// this looks weird, don't think many would use it, but it's allowed\nif 1 \u003e 2 =\u003e validate(email: \"some.other.other@email.com\", phone: \"44444444\")\nelse =\u003e if 1 \u003e 2 =\u003e false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazshare%2Folang-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazshare%2Folang-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazshare%2Folang-old/lists"}