From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 4773120248 for ; Sun, 7 Apr 2019 19:16:42 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 24286121734; Mon, 8 Apr 2019 04:16:38 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 2CDD91215BE for ; Mon, 8 Apr 2019 04:16:34 +0900 (JST) Received: by filter0060p3iad2.sendgrid.net with SMTP id filter0060p3iad2-11175-5CAA4C93-A 2019-04-07 19:16:35.298305236 +0000 UTC m=+175276.626536698 Received: from herokuapp.com (unknown [52.87.244.88]) by ismtpd0015p1iad1.sendgrid.net (SG) with ESMTP id rVASDzf_RjatBH7GgWMiLw for ; Sun, 07 Apr 2019 19:16:35.468 +0000 (UTC) Date: Sun, 07 Apr 2019 19:16:35 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 67670 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 14844 X-Redmine-Issue-Author: rmosolgo X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr1R+6ctKLtw5=2FroUM4vCh?= =?us-ascii?Q?PLUwN2P9kkLki77lsSJg+ZUuX9VSE4TscQcv83y?= =?us-ascii?Q?SLlL4HHyoHxrK4HLBIauH0WoUbY1DSWW6fc1kPi?= =?us-ascii?Q?hrO7mGqK60+PnoEkD8vAWxrUDxVJ9YBrKLWrerw?= =?us-ascii?Q?dXXsyf12BFJMWe3ttcZ1p3hSjFHfgToya1A=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92186 Subject: [ruby-core:92186] [Ruby trunk Feature#14844] Future of RubyVM::AST? X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #14844 has been updated by Eregon (Benoit Daloze). BTW, @bozhidar discussed relevant points about Ripper and `RubyVM::AbstractSyntaxTree` in https://metaredux.com/posts/2019/03/30/the-missing-ruby-code-formatter.html#the-impact-of-the-parser He makes good points there. ---------------------------------------- Feature #14844: Future of RubyVM::AST? https://bugs.ruby-lang.org/issues/14844#change-77515 * Author: rmosolgo (Robert Mosolgo) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Hi! Thanks for all your great work on the Ruby language. I saw the new RubyVM::AST module in 2.6.0-preview2 and I quickly went to try it out. I'd love to have a well-documented, user-friendly way to parse and manipulate Ruby code using the Ruby standard library, so I'm pretty excited to try it out. (I've been trying to learn Ripper recently, too: https://ripper-preview.herokuapp.com/, https://rmosolgo.github.io/ripper_events/ .) Based on my exploration, I opened a small PR on GitHub with some documentation: https://github.com/ruby/ruby/pull/1888 I'm curious though, are there future plans for this module? For example, we might: - Add more details about each node (for example, we could expose the names of identifiers and operators through the node classes) - Document each node type I see there is a lot more information in the C structures that we could expose, and I'm interested to help out if it's valuable. What do you think? -- https://bugs.ruby-lang.org/