Files
hak/src/kernel.hcl
hyung-hwan dfc6ec94f4
All checks were successful
continuous-integration/drone/push Build is passing
updating internal class representation
2024-07-23 23:50:29 +09:00

53 lines
690 B
HCL

class Apex {
}
class Object :: Apex {
}
class Collection :: Object {
}
class IndexedCollection :: Collection {
}
class FixedSizedCollection :: Collection {
}
class Array :: FixedSizedCollection {
}
class String :: Array {
}
fun Collection:length() {
return (arr.length self)
}
fun Collection:slice(index count) {
return (arr.slice self index count)
}
fun Class:name() {
return (core.class_name self)
}
##class String:: Array [a b c] {
##}
##class String:: Array [
## monaco
## duncan
## falcon
## deuce
## canival
## pebble
## godzilla
##] {
## fun Collection:slice(index count) {
## return (arr.slice self index count)
## }
##}
printf "string length %d\n" ("aaaa":length)