{"id":27435603,"url":"https://github.com/ketgg/hana","last_synced_at":"2025-04-14T18:53:12.193Z","repository":{"id":154056069,"uuid":"600897044","full_name":"ketgg/Hana","owner":"ketgg","description":"Hana is an elegant, clean and minimalistic interpreted programming language inspired from lua, python and javascript \u003c3","archived":false,"fork":false,"pushed_at":"2023-04-23T14:56:07.000Z","size":613,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T18:48:35.617Z","etag":null,"topics":["bison","compiler-design","flex","intermediate-code-generation","interpreter","lex","llvm","programming-language","yacc"],"latest_commit_sha":null,"homepage":"https://syylvette.github.io/Hana/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ketgg.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}},"created_at":"2023-02-12T22:50:44.000Z","updated_at":"2024-06-30T21:53:37.000Z","dependencies_parsed_at":"2023-07-21T20:47:14.492Z","dependency_job_id":null,"html_url":"https://github.com/ketgg/Hana","commit_stats":null,"previous_names":["re1san/hana","kettogg/hana","ketgg/hana"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketgg%2FHana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketgg%2FHana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketgg%2FHana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketgg%2FHana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ketgg","download_url":"https://codeload.github.com/ketgg/Hana/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248941946,"owners_count":21186926,"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":["bison","compiler-design","flex","intermediate-code-generation","interpreter","lex","llvm","programming-language","yacc"],"created_at":"2025-04-14T18:53:11.311Z","updated_at":"2025-04-14T18:53:12.188Z","avatar_url":"https://github.com/ketgg.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eHana\u003c/h1\u003e\nHana is an elegant, clean and minimalistic interpreted programming language inspired from lua, python and javascript \u0026lt;3\n\n⚠️  *WIP ...*\n\n*For now Doxygen docs* - [🌸 Hana Documentation](https://syylvette.github.io/Hana/)\n\n\u003ch2 align=\"center\"\u003eDeps\u003c/h2\u003e\n\n\u003cul\u003e\n\u003cli\u003eCmake \u003e= 3.12\u003c/li\u003e\n\u003cli\u003eFlex\u003c/li\u003e\n\u003cli\u003eBison\u003c/li\u003e\n\u003cli\u003eLLVM (version 10.0.1)\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2 align=\"center\"\u003eBuilding the interpreter\u003c/h2\u003e\n\n```\ngit clone https://github.com/syylvette/Hana.git\ncd Hana\nmkdir Build \u0026\u0026 cd Build\ncmake .. \u0026\u0026 make\n\n## Generates a binary 'hana' in Build/Hana directory\n./hana -h  ## Lists the usage\n```\nBuiliding the binary might take few minutes depending on your Pc.\n\u003cbr\u003e\nYou can also get the binary from Releases, but it will probably only work on Arch or Arch other based distros,\nas the binary was built on Arch linux with x86 architecture.\n\u003cbr\u003e\n\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\n\u003ch4 align=\"left\"\u003eCreate a hana file\u003c/h4\u003e\n\n```py\ntouch hello.hana \u0026\u0026 vim hello.hana\n```\n\n```py\nwriteln(\"Hello World!\")\n```\n\n\u003ch4 align=\"left\"\u003eRun\u003c/h4\u003e\n\nUsing the hana interpreter\n```py\nhana hello.hana\n```\n\n\u003ch4 align=\"left\"\u003eOutput\u003c/h4\u003e\n\n```\nHello World!\n```\n\n\u003ch2 align=\"center\"\u003eDocumentation\u003c/h2\u003e\n\n\u003ch3 align=\"center\"\u003eGeneral\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\u003ccode\u003ehana -h\u003c/code\u003e Opens the Hana help menu.\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eVariables\u003c/h3\u003e\n\u003cp align=\"center\"\u003eVariables can be decluwuared using the keyword \u003ccode\u003elet\u003c/code\u003e or by using their types \u003ccode\u003eint\u003c/code\u003e \u003ccode\u003edouble\u003c/code\u003e \u003ccode\u003estring\u003c/code\u003e \u003ccode\u003eboolean\u003c/code\u003e.\u003c/p\u003e\n\n```py\nlet baka = 99\nstring tehe = \"hahahah\"\nint chan = 25\nlet baka = baka + 1\nlet chan = chan * 2\n\nwriteln(tehe)\nwriteln(\"%d\", baka)\nwriteln(\"%d\", chan) -- Basically just a scanf alias \n```\n\n\u003ch4 align=\"left\"\u003eOutput\u003c/h4\u003e\n\n```\nhahahah\n100\n50\n```\n\n\u003ch3 align=\"center\"\u003eConditionals\u003c/h3\u003e\n\n```py\nif《condition》\n  《statements》\nelse《condition》\n  《statements》\n\n-- No else if supported now\n```\n\n\u003ch3 align=\"center\"\u003eComments\u003c/h3\u003e\n\n```py\n-- Single line comment, inspired from lua!\n```\n\n```py\n--[[\n  Multi\n  Line\n  Comment\n--]]\n```\n\n\n\u003ch3 align=\"center\"\u003eLoops\u003c/h3\u003e\n\n```py\nlet c = 5\nwhile c \u003e 0\n    writeln(\"UwU\")\n    c = c - 1\nelse\n    writeln(\"Boom\")\n```\n\n\u003ch4 align=\"left\"\u003eOutput\u003c/h4\u003e\n\n```\nUwU\nUwU\nUwU\nUwU\nUwU\nBoom\n```\n\n\u003ch3 align=\"center\"\u003eFunctions/Classes\u003c/h3\u003e\n\nFunction are created by ```block()``` keyword.\nClasses can also be created by same keyword ```block```.\n\n```py\nblock funcName(《parameters》) : 《returnType》\n    《statements》\n    return 《nothing/something》\n```\nRefer ```Testing``` for more examples ~\n\n---\n\n\n\u003e README [Credit](https://github.com/virejdasani/pythOwO) \u003cbr\u003e\n\u003e Reference Language [Kaleidoscope](https://llvm.org/docs/tutorial/) \u003cbr\u003e\n\u003e Other References [ghaiklor/llvm-kaleidoscope](https://github.com/ghaiklor/llvm-kaleidoscope) \u003cbr\u003e\n\u003e Guide https://gnuu.org/2009/09/18/writing-your-own-toy-compiler/\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fketgg%2Fhana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fketgg%2Fhana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fketgg%2Fhana/lists"}