理解Python中的AST 何翔宇3e340d762f6eb19e725/p1_2.jpg) ## 理解 Python 中的 AST 何翔宇(正小歪) 字节跳动·效率工程·后端开发工程师 ## 目录 Intro CPython's Compiler How to Use AST Library Use AST to Solve Problems Suggestion and Reference  从解析树中读取 - 根据转换规则 Parser/Python.asdl 使用 Python/python-ast.c 生成 AST - PyAST_CompileObject()、PySymtable_BuildObject()、compiler_mod() - 遍历 AST 各个节点创建符号表 - 交给一个巨大「switch」处理,创建0 码力 | 39 页 | 6.95 MB | 2 年前3
云原生虚拟数仓 PieCloudDB 的架构和关键模块实现0 码力 | 43 页 | 1.14 MB | 1 年前3
2.1.3 如何用go module构建模块化跨链平台GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 如何用go module构建模块化跨链平台 汪小益 趣链科技 ’ alt=‘OCR图片’/> 什么是区块链 跨链的重难点分析 跨链平台架构设计 Go module和plugin 的应用实践 GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 1 什么是区块链 GOPHER alt=‘OCR图片’/> 中继链模块与流程 ’ alt=‘OCR图片’/> 为什么需要模块化 1 中继链和网关有大量公共组件 网络模块 执行模块 验证模块 协议处理模块 加密模块 2 灵活适配不同需求和版本 应用链访问模块 以太坊 Fabric 趣链区块链 天平链 共识模块 PBFT RAFT POS POA HOTSTUFF Golang提供了两种模块化工具,一个是go module,一个是go / 2020-11.21-22 4 GO module和plugin实践 GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 4 GO modules实践:无处不在的模块 工具库(存储、加密、网络、日志等) https://github.com/meshplus/bitxhub-kit 验证引擎&IBTP协议库 https://github.com/meshplus/bitxhub-core0 码力 | 27 页 | 1.24 MB | 1 月前3
C++高性能并行编程与优化 - 课件 - 16 现代 CMake 模块化项目管理指南CMake # 现代 CMake 模块化项目管理指南 彭于斌 (@archibate) 课件 & 源码:https://github.com/parallel101/course 往期录播:https://space.bilibili.com/263032155 ## 第一章:文件 / 目录组织规范 基于 CMake 的 C/C++ 项目,如何优雅地、模块化地组织大量源文件? ## 推荐的目录组织方式 目录组织格式: • 项目名 /include/ 项目名 / 模块名 .h • 项目名 /src/ 模块名 .cpp • CMakeLists.txt 中写: • target include directories(项目名 PUBLIC include) • 源码文件中写: • #include < 项目名 / 模块名 .h> • 项目名:: 函数名 (); ## 推荐的目录组织方式 推荐的目录组织方式 - 头文件(项目名 /include/ 项目名 / 模块名 .h)中写: • #pragma once • namespace 项目名 { • void 函数名(); • } • 实现文件(项目名 /src/ 模块名 .cpp)中写: • #include < 项目名 / 模块名 .h> • namespace 项目名 { • void 函数名 () {0 码力 | 56 页 | 6.87 MB | 2 年前3
Swift 写解释器 - 戴铭什么是解释器?什么是解析器?  源代码 一 编译 字节码|AST VM 解释执行 结果  工作流程0 码力 | 19 页 | 29.57 MB | 2 年前3
Go Compile Time Instrumentationlevel manipulation are part of standard library go/types go/constant go/parser go/ast go/scanner go/token ## Go AST Traversal func main() { // parse file fset := token.NewFileSet() node ParseComments) if err != nil { log.Fatal(err) } ast.Inspect(node, func(n ast.Node) bool { fn, ok := n.(*ast.FuncDecl) if ok { fmt.Printf(format: "function modifying it. It uses the AST (Abstract Syntax Tree) representation of the code to determine its operational flow and injects necessary OpenTelemetry functionality into the AST. The AST modification algorithm0 码力 | 27 页 | 1.74 MB | 1 年前3
How to Build Your First C++ Automated Refactoring Tool - CppCon 2023*Context) : ClangTidyCheck(Name, Context) {} void registerMatchers(ast_matchers::MatchFinder *Finder) override; void check(const ast_matchers::MatchFinder::MatchResult &Result) override;}; 












