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
270
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
Kubernetes x k6 で負荷試験基盤を開発して 負荷試験を民主化した話 / Kubernetes x k6
sansan_randd
2
730
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
目の前の仕事と向き合うことで成長できる - 仕事とスキルを広げる / Every little bit counts
soudai
22
5.8k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
0
100
CZII - CryoET Object Identification 参加振り返り・解法共有
tattaka
0
240
アジャイル開発とスクラム
araihara
0
160
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
100
第13回 Data-Centric AI勉強会, 画像認識におけるData-centric AI
ksaito_osx
0
360
日経電子版 x AIエージェントの可能性とAgentic RAGによって提案書生成を行う技術
masahiro_nishimi
1
290
Tech Blogを書きやすい環境づくり
lycorptech_jp
PRO
0
120
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.5k
Featured
See All Featured
Docker and Python
trallard
44
3.3k
Being A Developer After 40
akosma
89
590k
Automating Front-end Workflow
addyosmani
1367
200k
The Language of Interfaces
destraynor
156
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
31
2.1k
It's Worth the Effort
3n
184
28k
We Have a Design System, Now What?
morganepeng
51
7.4k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
4 Signs Your Business is Dying
shpigford
182
22k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
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