搜书网 本次搜索耗时 0.018 秒,为您找到 124 个相关结果.
  • References

    References References Lua 5.4 Reference Manual , which is also the requirements document for this project. “Lua Programming (4th Edition)”, the official Lua tutorial. Althou...
  • Preface

    Preface Content Preface This series was written in Chinese originally. This English version is mainly translated by Google Translate . So please forgive me for the terrible ...
  • Basic Compilation Principles

    Compilation principle Compiled and Interpreted language Parse and Execute Compilation principle The principle of compilation is a very profound and mature subject. It is not ...
  • 垃圾回收和Rc

    垃圾回收和Rc GC vs RC Rust中的Rc 垃圾回收和Rc 在上面字符串定义 小节中,我们使用了Rc 来定义Lua中的字符串类型,这就涉及到了一个重要话题:垃圾回收(Garbage Collection,即GC)。垃圾回收是一个非常通用且深入的话题,这里只介绍跟我们解释器实现相关的部分。 GC vs RC Lua语言是一门自动管理内...
  • Function

    Function Function This chapter introduces functions. There are two types of functions in Lua: Lua function, defined in Lua; External functions are generally implemented in th...
  • 函数

    函数 函数 本章介绍函数。Lua中的函数分为两种: Lua函数,在Lua中定义; 外部函数,一般是解释器语言实现,比如在Lua的官方实现中就是C函数,而在我们这里就是Rust函数。比如这个项目最开始的print 函数就是在解释器中用Rust实现的。 前者的定义(语法分析)和调用(虚拟机执行)都是在Lua语言中,流程完整,所以接下来先讨论并实现前...
  • Unicode and UTF-8

    Unicode and UTF-8 Unicode and UTF-8 Concepts Garbled Code fn main() { } Modify the Code Conversion from &str, String, &[u8], Vec to Value Test Summarize Unicode and UTF...
  • Rust闭包

    Rust闭包 Lua官方实现中的C闭包 Rust闭包的类型定义 虚拟机执行 测试 Rust闭包的局限 Rust闭包 前面几节介绍了在Lua中定义的闭包。除此之外,Lua语言的官方实现还支持C语言闭包。我们的解释器是由Rust实现的,自然也就要改成Rust闭包。本节就来介绍Rust闭包。 Lua官方实现中的C闭包 先来看下Lua官方实现...
  • To Be Continued

    To Be Continued To Be Continued We have implemented the core features of the Lua interpreter. Still, we’re far from our original goal - a complete, performant, production-grade...
  • 前言

    前言 内容 前言 这系列文章介绍用Rust语言从零开始实现一个Lua解释器。 Rust语言个性鲜明,也广受欢迎 ,然而学习曲线陡峭。我在读完《Rust程序设计语言》 并写了些练习代码后,深感必须通过一个较大的项目实践才能理解和掌握。 实现一个Lua解释器 就很适合作为这个练习项目。因为其规模适中,足够涉及Rust的大部分基础特性而又不至于难以企...