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
310
0
Share
AST a la vista baby
Slides for the talk given at NodeConf Argentina 2017
Leonardo Garcia Crespo
October 27, 2017
More Decks by Leonardo Garcia Crespo
See All by Leonardo Garcia Crespo
AST: Awesome Super Tool
leoasis
0
270
Hi Fiber!
leoasis
0
57
Other Decks in Technology
See All in Technology
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
310
Babylon.js を使って試した色々な内容 / Various things I tried using Babylon.js / Babylon.js 勉強会 vol.5
you
PRO
0
200
Tour of Agent Protocols: MCP, A2A, AG-UI, A2UI with ADK
meteatamel
0
200
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
130
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
230
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
タスク管理も1on1も、もう「管理」じゃない - KiroとBedrock AgentCoreで変わった“判断の仕事”
yusukeshimizu
0
160
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
180
ThetaOS - A Mythical Machine comes Alive
aslander
0
240
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
290
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
1
230
Embeddings : Symfony AI en pratique
lyrixx
0
450
Featured
See All Featured
Optimizing for Happiness
mojombo
378
71k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Embracing the Ebb and Flow
colly
88
5k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
84
Test your architecture with Archunit
thirion
1
2.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
First, design no harm
axbom
PRO
2
1.2k
Designing Experiences People Love
moore
143
24k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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