removed the option HCL_TRAIT_LANG_ENABLE_BLOCK, thus removing conditional codes for simplicity.
All checks were successful
continuous-integration/drone/push Build is passing

changed the compiler to require a block expression as the class body
This commit is contained in:
2024-07-06 12:16:05 +09:00
parent 0befaf0a97
commit 6407d3c175
10 changed files with 64 additions and 108 deletions

View File

@ -1,7 +1,7 @@
class Object {
}
class Collection: Object {
class Collection : Object {
}
class IndexedCollection: Collection {
@ -26,5 +26,22 @@ fun Collection:slice(index count) {
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)