From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id C24B31F404 for ; Tue, 28 Aug 2018 01:00:21 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 4B625120A30; Tue, 28 Aug 2018 10:00:19 +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 512DA12091D for ; Tue, 28 Aug 2018 10:00:17 +0900 (JST) Received: by filter0002p3iad2.sendgrid.net with SMTP id filter0002p3iad2-20372-5B849E9E-2 2018-08-28 01:00:14.081228003 +0000 UTC m=+875728.617119880 Received: from herokuapp.com (ec2-54-234-254-234.compute-1.amazonaws.com [54.234.254.234]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id sGy9ku4yTV-40l9YINlieQ Tue, 28 Aug 2018 01:00:13.973 +0000 (UTC) Date: Tue, 28 Aug 2018 01:00:14 +0000 (UTC) From: samuel@oriontransfer.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 64084 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 14844 X-Redmine-Issue-Author: rmosolgo X-Redmine-Sender: ioquatix 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS708+ITy+MCAdjipexu3iFdvGyY0pLFo37ImJ e+TPhSdvg/ZRNm1hzmat1UcoxX1FG+2n2+2ooNb8NSeJHoQrnyDnEcEWhr84fJGBODfephPrxOqtvb mce5HuB6oClZ6I1NyDMP/xtm2uzpLzj6mD+ThMlBKqFFdxOsSWQZtm7nYQ== X-ML-Name: ruby-core X-Mail-Count: 88700 Subject: [ruby-core:88700] [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 ioquatix (Samuel Williams). I hope this is relevant. I found an interesting article here: http://www.oilshell.org/blog/2016/12/11.html It describes the process Python uses. It looks like it's standardised in a way that might be a useful goal for `RubyVM::AST`. ---------------------------------------- Feature #14844: Future of RubyVM::AST? https://bugs.ruby-lang.org/issues/14844#change-73757 * 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/