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
210
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
230
Hi Fiber!
leoasis
0
40
Other Decks in Technology
See All in Technology
実例で紹介するRAG導入時の知見と精度向上の勘所
yamahiro
4
1.4k
Improve Your Development Workflow with Gemini Code Assist
meteatamel
0
120
web-application-security
matsuihidetoshi
1
190
Building a RAG-poweredAI chat appwith Python and VS Code
pamelafox
0
140
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
14
35k
【SORACOM UG 東海】あらゆるモノがつながる社会へ、IoT と SORACOM
soracom
PRO
1
130
One engineer company with Ruby on Rails
rstankov
2
410
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
Microsoft Intune 勉強会 第 2 回目
tamaiyutaro
2
370
Rustで「プリズモイダル法」を利用して「土量計算」をガチでやる
nokonoko1203
1
250
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
2
280
LayerXにおけるLLMプロダクト開発の今までとこれから
layerx
PRO
3
590
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
BBQ
matthewcrist
80
8.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
5
3.4k
What the flash - Photography Introduction
edds
64
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
GraphQLの誤解/rethinking-graphql
sonatard
55
9.3k
Mobile First: as difficult as doing things right
swwweet
217
8.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
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