rewrote compile_fun() to support attribute list for a function
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-02 00:33:34 +09:00
parent 29af1562fc
commit 3d0cdb5366
13 changed files with 496 additions and 284 deletions

View File

@ -14,7 +14,7 @@ fun Number: ~= (oprnd) { return (~= self oprnd) }
class A [ a b c ] {
fun :*newInstance(x y z) {
fun(#ci) newInstance(x y z) {
set a x;
set b y;
set c z;
@ -28,7 +28,7 @@ class A [ a b c ] {
class B :: A [ d e f ] {
fun :*newInstance(x y z) {
fun(#ci) newInstance(x y z) {
super:newInstance (* x 2) (* y 2) (* z 2);
set d x;
set e y;
@ -36,9 +36,9 @@ class B :: A [ d e f ] {
return self;
};
fun :: getSuper() { return super; };
###fun :: getSuperclass() { return (self:superclass); };
fun :: getSelf() { return self; };
fun(#c) getSuper() { return super; };
###fun(#c) getSuperclass() { return (self:superclass); };
fun(#c) getSelf() { return self; };
fun sum() {
return (+ (super:get-a) (super:get-b) (super:get-c) self.d self.e self.f);