From 1655706fa22748655e7ece7c1d3412fea4b619e4 Mon Sep 17 00:00:00 2001 From: "Md. Almas Ali" Date: Wed, 30 Oct 2024 03:56:06 +0600 Subject: [PATCH] feat: added copyright() built-in function and updated shell exit experience. --- core/builtin_funcs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/builtin_funcs.py b/core/builtin_funcs.py index 616ae85..7e65188 100755 --- a/core/builtin_funcs.py +++ b/core/builtin_funcs.py @@ -625,6 +625,11 @@ def execute_credits(self, exec_ctx: Context) -> RTResult[Value]: print("Contributors:\n\tangelcaru (github.com/angelcaru)\n\tVardan2009 (github.com/Vardan2009)") return RTResult[Value]().success(Null.null()) + @args([]) + def execute_copyright(self, exec_ctx: Context) -> RTResult[Value]: + print("Copyright (c) 2023-2024 Radon Software Foundation.\nAll Rights Reserved.") + return RTResult[Value]().success(Null.null()) + def run( fn: str, @@ -725,6 +730,7 @@ def create_global_symbol_table() -> SymbolTable: # Shell functions ret.set("license", BuiltInFunction("license")) ret.set("credits", BuiltInFunction("credits")) + ret.set("copyright", BuiltInFunction("copyright")) ret.set("help", BuiltInFunction("help")) ret.set("dir", BuiltInFunction("dir")) # Built-in classes