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
A possible neat feature idea that occurred to me while out walking: a literal that would compile down to a Coco syntax tree object/JavaScript syntax tree object (if it's generated by Coco on the way to JS?)/worst case JavaScript source fragment as string (that could be parsed back to an AST by client code as required).
Use case (for the sake of discussion let's use the syntax ^( ... )):
The AST above is adapted from coco -aj for (5 < foo && foo < 10) as the AST for 5 < foo < 10 (obviously) didn't have extended comparison transformed into an and expression.
Point being the resulting AST should be as easy to use as possible by client code, with as much of Coco's expressiveness remaining as is sensible.
The text was updated successfully, but these errors were encountered:
A possible neat feature idea that occurred to me while out walking: a literal that would compile down to a Coco syntax tree object/JavaScript syntax tree object (if it's generated by Coco on the way to JS?)/worst case JavaScript source fragment as string (that could be parsed back to an AST by client code as required).
Use case (for the sake of discussion let's use the syntax
^( ... )
):-->
The AST above is adapted from
coco -aj
for(5 < foo && foo < 10)
as the AST for5 < foo < 10
(obviously) didn't have extended comparison transformed into an and expression.Point being the resulting AST should be as easy to use as possible by client code, with as much of Coco's expressiveness remaining as is sensible.
The text was updated successfully, but these errors were encountered: