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
# Comprehension arrays
[x for x in xs]
UInt[b(c, e) for c in d for e in f]
[
a(1)
for a in f
]
[
a(1)
for a in f
,b in e
]
[
a(1)
for a in f
for b in e
]
==>
Program(
ComprehensionExpression(
Generator(
Identifier,
GenFor(for, ForBinding(Identifier, AssignmentOp(in), Identifier)),
)
),
IndexExpression(
Identifier,
ComprehensionExpression(
Generator(
CallExpression(Identifier, Arguments(Identifier, Identifier)),
GenFor(for, ForBinding(Identifier, AssignmentOp(in), Identifier)),
GenFor(for, ForBinding(Identifier, AssignmentOp(in), Identifier)),
)
)
),
ComprehensionExpression(
Generator(
CallExpression(Identifier, Arguments(IntegerLiteral)),
GenFor(
for,
ForBinding(Identifier, AssignmentOp(in), Identifier),
ForBinding(Identifier, AssignmentOp(in), Identifier),
),
)
),
ComprehensionExpression(
Generator(
CallExpression(Identifier, Arguments(IntegerLiteral)),
GenFor(
for,
ForBinding(Identifier, AssignmentOp(in), Identifier),
for,
ForBinding(Identifier, AssignmentOp(in), Identifier),
),
)
),
)
fonsp
linked a pull request
Jan 8, 2025
that will
close
this issue
It is incorrectly parsed as Matrix:
But a generator is supported:
The text was updated successfully, but these errors were encountered: