You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In current Tokay v0.4, commas , are optional part of the syntax.
After some consideration, especially on #43, the idea came up that lists could generally by defined by separating commas, so the sequence 1 2 3 4 results in a list (1, 2, 3, 4), where 1 2, 3 4 actually could be interpretered as definitive list (2, 3) which is inside of a sequence, resulting in the list (1, (2, 3), 4).
This syntax is only allowed as SequenceItem or CollectionItem. Commas in parameter lists are still specified as they are, except when explicitly specified, so fn(1, (2,3), 4) provides 3 parameters.
The text was updated successfully, but these errors were encountered:
This is a solution for tokay-lang#43 but also should be improved by tokay-lang#45.
Fixed tokay.tok as well to accept for empty collections, as parser.rs does.
b48b420 implements a different way on this, but still makes the comma optional. This was just a neat idea, but doesn't comply with the rest of Tokays syntax and also raises confusions.
In current Tokay v0.4, commas
,
are optional part of the syntax.After some consideration, especially on #43, the idea came up that lists could generally by defined by separating commas, so the sequence
1 2 3 4
results in a list(1, 2, 3, 4)
, where1 2, 3 4
actually could be interpretered as definitive list (2, 3) which is inside of a sequence, resulting in the list(1, (2, 3), 4)
.This syntax is only allowed as SequenceItem or CollectionItem. Commas in parameter lists are still specified as they are, except when explicitly specified, so
fn(1, (2,3), 4)
provides 3 parameters.The text was updated successfully, but these errors were encountered: