Tagged articles
4 articles
Page 1 of 1
ELab Team
ELab Team
Jun 17, 2022 · Fundamentals

How a Tiny Compiler Works: From Tokenizer to Code Generator

This article walks through the core concepts and implementation steps of a minimal JavaScript compiler, covering tokenization, parsing into an AST, traversing with a visitor, transforming the tree, and generating target code, while also explaining the visitor pattern and polyfills.

ASTJavaScriptParser
0 likes · 17 min read
How a Tiny Compiler Works: From Tokenizer to Code Generator
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 7, 2021 · Databases

Generating SQL Fingerprints with TiDB SQL Parser

This article explains how to use the TiDB SQL parser to create custom SQL fingerprints by traversing the abstract syntax tree, replacing literal values with placeholders, and restoring the modified tree back to SQL, offering a more maintainable alternative to string‑based approaches.

GoSQL ParserSQL fingerprint
0 likes · 6 min read
Generating SQL Fingerprints with TiDB SQL Parser
MaoDou Frontend Team
MaoDou Frontend Team
Apr 28, 2019 · Frontend Development

How JavaScript ASTs Power Babel, UglifyJS, and Code Transformations

This article explains what an Abstract Syntax Tree (AST) is, its role in JavaScript tooling such as Babel, UglifyJS, and type checking, details the lexical and syntactic analysis stages of AST generation, and demonstrates a practical Babel plugin example that modifies console output using visitors.

ASTJavaScriptVisitor Pattern
0 likes · 6 min read
How JavaScript ASTs Power Babel, UglifyJS, and Code Transformations