moonscript
moonscript copied to clipboard
Syntax caveats when using List Comprehensions
A simple example has me transforming a list of lists:
[[trans x for x in sub] for sub in list]
Preliminary testing does show this parsing as a comprehension instead of a longstring. However, most syntax highlighters are likely not going to be sophisticated enough to determine this. Adding a space at the front between the outer and inner comprehension will resolve the syntax ([ [trans x...), but will require additional usage direction for list comprehensions.