Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AST a la vista baby
Search
Leonardo Garcia Crespo
October 27, 2017
Technology
0
300
AST a la vista baby
Slides for the talk given at NodeConf Argentina 2017
Leonardo Garcia Crespo
October 27, 2017
Tweet
Share
More Decks by Leonardo Garcia Crespo
See All by Leonardo Garcia Crespo
AST: Awesome Super Tool
leoasis
0
260
Hi Fiber!
leoasis
0
45
Other Decks in Technology
See All in Technology
ゼロからはじめる採用広報
yutadayo
3
1k
データ基盤からデータベースまで?広がるユースケースのDatabricksについて教えるよ!
akuwano
3
140
american aa airlines®️ USA Contact Numbers: Complete 2025 Support Guide
aaguide
0
390
shake-upを科学する
rsakata
7
810
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
0
200
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
970
AIの全社活用を推進するための安全なレールを敷いた話
shoheimitani
2
570
関数型プログラミングで 「脳がバグる」を乗り越える
manabeai
2
210
QuickSight SPICE の効果的な運用戦略~S3 + Athena 構成での実践ノウハウ~/quicksight-spice-s3-athena-best-practices
emiki
0
150
改めてAWS WAFを振り返る~業務で使うためのポイント~
masakiokuda
2
300
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
10
130k
20250707-AI活用の個人差を埋めるチームづくり
shnjtk
6
4k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
GitHub's CSS Performance
jonrohan
1031
460k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
830
Practical Orchestrator
shlominoach
189
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Visualization
eitanlees
146
16k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Transcript
AST a la vista, baby
Lenny meetupjs.com.ar leogcrespo leoasis
None
ESLint
None
ES2015 ES5 ES2016 ES2017 ESNext ES2015 ES2016 ES2017
ES2015 ES5 ES2016 ES2017 ESNext ES2015 ES2016 ES2017 … …
… … … …
None
None
None
None
ESLint
ESLint ES2015 ES2016 ES2017 ESNext Estilo JS gotchas Variables Node.js
CommonJS …
ESLint ES2015 ES2016 ES2017 ESNext Estilo JS gotchas Variables Node.js
CommonJS … … … …
None
None
Cómo funcionan?
None
PARSERS
hacer un parser Escribir en un archivo function parse(code) {}
Escribir el resto del parser
https://github.com/thejameskyle/the-super-tiny-compiler
None
None
Abstract Syntax Tree (AST)
Abstract Syntax Tree (AST)
None
None
None
None
None
None
None
None
None
AST
AST
AST Plugins Código Código
AST ⚠ Reglas Warnings/Errores ESLint Código
None
None
None
None
None
None
None
None
None
None
None
None
astexplorer.net
None
ESLint GraphQL Prettier PostCSS JSCodeShift Syntax Highlighting Flow Typescript TSLint
None
Usá ESLint para validar que no se use una version
deprecada de un componente interno de tu empresa.
Usá un plugin de Babel para agregar parámetros contextuales de
debug en las llamadas a tu API en desarrollo
Parseá con Babylon (parser de Babel) los archivos de tu
aplicación y extraé los mensajes de i18n de tu código a un archivo para enviar a un servicio de traduccion.
None
⚡
None
⚙ ☠
4
https://kentcdodds.com/talks/#writing-custom-babel-and-eslint- plugins-with-asts https://blog.kentcdodds.com/how-writing-custom-babel-and-eslint- plugins-can-increase-your-productivity-and-improve-user- fd6dd8076e26 https://kentcdodds.com/workshops/#code-transformation-and-linting Kent C. Dodds James
Kyle https://github.com/thejameskyle/babel-handbook https://github.com/thejameskyle/the-super-tiny-compiler Henry Zhu http://henryzoo.com/babel-plugin-slides/assets/player/ KeynoteDHTMLPlayer.html#0
It’s AST, I know this!
leogcrespo leoasis