website icon indicating copy to clipboard operation
website copied to clipboard

AST Explorer

Open sujinleeme opened this issue 6 years ago • 9 comments

Happy new year! 🎊 It is a very basic concept of AST panel as following as AST explorer.

Except for an auto focusing option in AST explorer, on/off methods, empty keys and location data features are completed.

ast

I appreciate your review and help in advance.

Related Issue : Babel Roadmap - AST Explorer

sujinleeme avatar Jan 01 '19 10:01 sujinleeme

Deploy preview for babel ready!

Built with commit 00da94bf27b950f8a01839425932aed6ae1ff3e3

https://deploy-preview-1933--babel.netlify.com

babel-bot avatar Jan 01 '19 10:01 babel-bot

Preview

That looks good. Would be cool to be able to click on the code and that it shows the location in the AST, as ASTExplorer.

Also, do you have an idea how we could remove our internal properties in the AST? (_fromTemplate, _letDone etc).

xtuc avatar Jan 07 '19 11:01 xtuc

우연히 웹서핑하다가 보게됐는데 바벨 컨트리뷰터라니 존경합니다ㄷㄷ

namuwikilover avatar Jan 08 '19 07:01 namuwikilover

Preview

@xtuc

I removed _fromTemplate, _letDone props in AST objects. Anything else?

sujinleeme avatar Jan 17 '19 18:01 sujinleeme

We should remove every property prefixed with _

nicolo-ribaudo avatar Jan 17 '19 18:01 nicolo-ribaudo

Preview @nicolo-ribaudo

All props that start with '_' prefixes are excluded.

sujinleeme avatar Jan 20 '19 05:01 sujinleeme

replaces #1421

danez avatar Feb 09 '19 22:02 danez

The output looks good (I haven't read the code yet). Another possible improvement is to show type always as the first property since it is the most important one, or to hide it and print something like

BinaryExpression {
	"left": NumericLiteral {
		"value":1
	},
	"operator": "+",
	"right": NumericLiteral {
		"value":1
	}
}

nicolo-ribaudo avatar Feb 09 '19 22:02 nicolo-ribaudo

There also seems to be a lot of unrelated changes to docs and versioned_docs, they should be reverted or the branch rebased.

danez avatar Feb 09 '19 22:02 danez