Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2021/02/22 - 对AST的理解 #53

Open
lxinr opened this issue Feb 22, 2021 · 0 comments
Open

2021/02/22 - 对AST的理解 #53

lxinr opened this issue Feb 22, 2021 · 0 comments
Labels

Comments

@lxinr
Copy link
Owner

lxinr commented Feb 22, 2021

(Abstract Syntax Tree) 抽象语法树

源代码语法结构的一种抽象表示。它以树状的形式表现编程语言的语法结构,树上的每个节点都表示源代码中的一种结构

是各类代码编译、语法检查、风格检查、自动补全等的基础

function fn() {
  const array = [1, 2, 3]
  return array.map(v => v++)
}

对应的AST https://astexplorer.net/
https://static.lxinr.com/2021/0222/1613986964406.jpeg

@lxinr lxinr added the JS基础 label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant