AdeptLanguage / Adept

The Adept Programming Language
GNU General Public License v3.0
124 stars 9 forks source link

[improve] Allow this useful thing: #39

Closed ghost closed 4 years ago

ghost commented 4 years ago

@IsaacShelton Have you planned to support this syntax:

repeat (10) print(idx)

// but if one more action:

repeat (10) {
    print(idx)
}

for if, for, repeat and etc.

NOTE: Like in C

IsaacShelton commented 4 years ago

@t0md3an This is currently how you can do the same thing:

repeat (10), print(idx)

repeat (10) {
    print(idx)
}

I've been thinking of making a way to avoid using , but until I figure out how possible it is, this is how you do it

IsaacShelton commented 4 years ago

@t0md3an This has been added in 9d2061a3de305f92c4a39c76a8da751a1224bd36 and should now work as expected:

repeat 10 print(idx)
repeat (10) print(idx)

repeat 10 {
    print(idx)
}

repeat (10) {
    print(idx)
}