{"id":27329450,"url":"https://github.com/csirmaz/ednascript","last_synced_at":"2025-04-12T12:34:07.334Z","repository":{"id":15712033,"uuid":"18450054","full_name":"csirmaz/EdnaScript","owner":"csirmaz","description":"EdnaScript is a simple extension to JavaScript that makes it easy to write object-oriented code with class inheritance (Perl)","archived":false,"fork":false,"pushed_at":"2016-02-17T20:27:49.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-03T08:21:20.780Z","etag":null,"topics":["ecmascript","object-oriented","preprocessor","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/csirmaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-04T19:29:02.000Z","updated_at":"2023-08-03T08:21:20.780Z","dependencies_parsed_at":"2022-08-25T14:31:23.787Z","dependency_job_id":null,"html_url":"https://github.com/csirmaz/EdnaScript","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2FEdnaScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2FEdnaScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2FEdnaScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2FEdnaScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csirmaz","download_url":"https://codeload.github.com/csirmaz/EdnaScript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248566783,"owners_count":21125725,"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":["ecmascript","object-oriented","preprocessor","transpiler"],"created_at":"2025-04-12T12:33:34.543Z","updated_at":"2025-04-12T12:34:07.328Z","avatar_url":"https://github.com/csirmaz.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EdnaScript\n\nEdnaScript is a simple extension to JavaScript that makes it\neasy to write object-oriented code, define classes, constructors,\nand inheritance between classes.\n\nThis script is a prepocessor that converts source written in\nEdnaScript into JavaScript (ECMAScript).\n\nEdnaScript is Copyright (C) 2014 Elod Csirmaz\n\nThis program is free software; you may redistribute it and/or modify\nit under the terms of the MIT License.\n\n## Usage\n\nednascript.pl \u003c INFILE.edna \u003e OUTFILE.js\n\n## EdnaScript Syntax\n\nEdnaScript extends JavaScript by defining shortcuts to class and method\ndefinitions. These shortcuts are full lines starting with a hash\n(and optionally, whitespace before the hash). The following outline\nlists all shortcuts:\n\n```\n#class \u003cCLASSNAME\u003e --- begins a class\n#base \u003cCLASSNAME\u003e --- determines the parent class (optional)\n\n  #constructor(arguments) --- begins the constructor method\n    \u003cJAVASCRIPT CODE\u003e\n    #super(arguments); --- calls the super constructor\n    #nosuper --- add this line if the super constructor should not be called automatically\n  #-constructor --- end the constructor method\n\n  #method \u003cMETHODNAME\u003e(arguments) --- begins a method\n    \u003cJAVASCRIPT CODE\u003e\n    #sup(...); --- calls the overridden method\n    #retsup(...); --- calls the overridden method and returns its return value\n  #-method --- ends the method\n\n#-class --- ends the class\n```\n\n## Notes\n\n* The compiler also allows type declarations before method names and argument names,\nwhich are simply deleted during preprocessing. For example:\n```\n#method bool hasprop(string property)\n```\n\n* The compiler aborts if neither #super nor #nosuper is used in a constructor\nof a class that has a parent class.\n\n* A file can include multiple classes.\n\n## Example\n\n```\n#class MyPoint\n\n   #constructor(float x, float y)\n      this._x = x;\n      this._y = y;\n   #-constructor\n\n   #method string info()\n      return ('('+this._x+','+this._y+')');\n   #-method\n\n#-class\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsirmaz%2Fednascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsirmaz%2Fednascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsirmaz%2Fednascript/lists"}