{"id":16989953,"url":"https://github.com/x39/leaf-lang","last_synced_at":"2025-07-06T15:41:33.587Z","repository":{"id":74149815,"uuid":"422350743","full_name":"X39/leaf-lang","owner":"X39","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-22T20:18:22.000Z","size":322,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T22:54:53.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/X39.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-10-28T20:45:31.000Z","updated_at":"2022-06-27T05:00:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3471a29-76cb-44cf-a8b0-687afecb0dd3","html_url":"https://github.com/X39/leaf-lang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X39%2Fleaf-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X39%2Fleaf-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X39%2Fleaf-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X39%2Fleaf-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/X39","download_url":"https://codeload.github.com/X39/leaf-lang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898458,"owners_count":20528341,"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":[],"created_at":"2024-10-14T03:08:32.968Z","updated_at":"2025-03-22T03:13:22.904Z","avatar_url":"https://github.com/X39.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![leaf-logo](logo-32px.png) leaf language\n*Parser for syntax was generated using [XCG](https://github.com/X39/XCG).\nRelated files are to be found inside the `syntax` folder.*\n\n# Design Goals\nLeaf is about a developers choices, about the toolbelt the dev wants (or has available)\nfor his frameworks, APIs or gigantic minification efforts.\n\nStuff like building shared-applications (as in service workers) and working with those should feel\nas natural as possible.\n\nThere should never be an argument about \"do we need this feature in the language really\", as the\nlanguage itself has to support all that awesomeness we all do. If one thinks that return-type\ndirected methods should be possible, it has to be made possible. If one wants to use `async` and `await`,\nthen there shall be syntactic suggar for it. If one wants to create magnificent and beautiful frameworks with\n`\"\u003cp\u003eMy \u003cspan class=\"fat\"\u003efancy\u003c/span\u003e html framework\"_html` then, again, it has to be possible.\n\nLeaf should never block your goals as a language.\nThere may not be a suited framework (aka: written code) yet,\nbut the language will never attempt to hinder you in\nbuilding that framework.\n\n# How will it look like\n**Disclaimer:**\nDue to the nature of leaf, the following syntax might be outdated.\n\n```\nnamespace leaf.example\n{\n    public class Tree\n    {\n        public unbound i32 Count\n        {\n            get { return _countBacking; }\n            set\n            {\n                _countBacking = value;\n                leaf.stdout.print($\"count has changed to {count_backing}\");\n            }\n        }\n        private unbound i32 _countBacking;\n        \n        \n        local Tree Seed()\n        {\n            alias branch = tree;\n            auto sapling = new stack branch();\n            count++;\n            return sapling;\n        }\n    }\n    \n    // Contracts are pseudo types that define a requirement of input types.\n    // An input type does not have to implement a contract to make it feasable\n    // for it.\n    public contract CBranch\n    {\n        CEnumerable\u003cRLeaf\u003e Leafs { get; } \n    }\n    \n    // Interfaces are compile-time reflection pseudo-types,\n    // allowing to create pseudo-methods\n    public reflecting contract RLeaf\n    {\n        bool Equals(RLeaf t)\n        {\n            // for, if and all other control structures\n            // do not require ()\n            for field f of RLeaf\n            {\n                if f != f(t)\n                    return false;\n            }\n            return true;\n        }\n    }\n}\n```\n\n# How is the ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx39%2Fleaf-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx39%2Fleaf-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx39%2Fleaf-lang/lists"}