changed the syntax for clarity - attribute list to use a tuple, class variable list to use a normal parenthesized list

This commit is contained in:
2025-09-15 01:41:43 +09:00
parent ef293d35d4
commit 37b652ead6
10 changed files with 140 additions and 148 deletions

View File

@ -15,7 +15,7 @@ fun Number: ~= (oprnd) { return (~= self oprnd) }
class A {
var a b c
fun(#ci) newInstance(x y z) {
fun[#ci] newInstance(x y z) {
set a x;
set b y;
set c z;
@ -30,7 +30,7 @@ class A {
class B: A {
var d e f
fun(#ci) newInstance(x y z) {
fun[#ci] newInstance(x y z) {
super:newInstance (* x 2) (* y 2) (* z 2);
set d x;
set e y;
@ -38,9 +38,9 @@ class B: A {
return self;
};
fun(#c) getSuper() { return super; };
###fun(#c) getSuperclass() { return (self:superclass); };
fun(#c) 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);