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
260
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
240
Hi Fiber!
leoasis
0
44
Other Decks in Technology
See All in Technology
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
760
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
52
13k
GraphQLとの向き合い方2022年版
quramy
43
13k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Being A Developer After 40
akosma
86
590k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
For a Future-Friendly Web
brad_frost
175
9.4k
Designing Experiences People Love
moore
138
23k
How to Ace a Technical Interview
jacobian
276
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
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