Skip to content

Commit eaef21a

Browse files
committed
refactor: rename main file to tlc.lua and update references
1 parent 1484c7b commit eaef21a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div align="center">
22

3-
![The Tiny Lua Compiler (TLC)](https://github.com/ByteXenon/TinyLua/assets/125568681/41cf5285-e31d-4b27-a8a8-ee83a7300f1f)
3+
![Tiny Lua Compiler (TLC)](https://github.com/ByteXenon/TinyLua/assets/125568681/41cf5285-e31d-4b27-a8a8-ee83a7300f1f)
44

5-
**A minimal, educational Lua 5.1 compiler written in Lua**
5+
**A minimal, educational Lua 5.1 compiler written in pure Lua**
66

77
_Inspired by [Jamie Kyle's The Super Tiny Compiler](https://github.com/jamiebuilds/the-super-tiny-compiler) written in JavaScript_
88

@@ -15,9 +15,9 @@ _Inspired by [Jamie Kyle's The Super Tiny Compiler](https://github.com/jamiebuil
1515
- **Zero dependencies**: Written in standard Lua 5.1 with no external libraries. Just one file and the Lua interpreter are all you need.
1616
- **Complete Pipeline:** Includes a tokenizer, parser, code generator, compiler, and a virtual machine, all in one file.
1717
- **Speed**: While education is the priority, the tokenizer uses optimized lookups and the compiler is designed efficiently, making it quite fast for a compiler written in a high-level language.
18-
- **100% test coverage**: TLC has a test suite that covers 100% of the code. Want to see it in action? Run `lua tests/test.lua` in your terminal.
18+
- **Tests**: Includes a comprehensive test suite with nearly 100% coverage, ensuring the compiler is as reliable as it is educational.
1919

20-
### [Want to jump into the code? Click here](https://github.com/bytexenon/The-Tiny-Lua-Compiler/blob/main/the-tiny-lua-compiler.lua)
20+
### [Want to jump into the code? Click here](https://github.com/bytexenon/The-Tiny-Lua-Compiler/blob/main/tlc.lua)
2121

2222
---
2323

@@ -53,7 +53,7 @@ Here is an example of how you can use it:
5353
source code to execution.
5454
--]]
5555

56-
local tlc = require("the-tiny-lua-compiler")
56+
local tlc = require("tlc")
5757

5858
-- 1. Source code to compile
5959
local source = [[
@@ -88,7 +88,7 @@ tlc.VirtualMachine.new(proto):execute()
8888

8989
### Okay so where do I begin?
9090

91-
Awesome! Head on over to the [the-tiny-lua-compiler.lua](https://github.com/bytexenon/The-Tiny-Lua-Compiler/blob/main/the-tiny-lua-compiler.lua) file.
91+
Awesome! Head on over to the [tlc.lua](https://github.com/bytexenon/The-Tiny-Lua-Compiler/blob/main/tlc.lua) file.
9292

9393
### What isn't covered? (Non-Goals)
9494

tests/perf.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
--]]
1818

1919
--* Imports *--
20-
local tlc = require("./../the-tiny-lua-compiler")
20+
local tlc = require("./../tlc")
2121

2222
-- Constants --
2323
local ITERATIONS = 500
24-
local TLC_CODE = io.open("./the-tiny-lua-compiler.lua", "r"):read("*a")
24+
local TLC_CODE = io.open("./tlc.lua", "r"):read("*a")
2525

2626
--* Functions *--
2727
local function benchmark_tokenizer(code)

tests/test.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--* Dependencies *--
2-
local tlc = require("the-tiny-lua-compiler")
2+
local tlc = require("tlc")
33

44
--* Constants *--
55

@@ -826,7 +826,7 @@ suite:describe("Complex General Tests", function()
826826
suite:it("Self-compilation", function()
827827
-- NOTE: This test might take a while to run.
828828
local testCode = [[
829-
local tlcSource = io.open("the-tiny-lua-compiler.lua"):read("*a")
829+
local tlcSource = io.open("tlc.lua"):read("*a")
830830
831831
local tlc = suite:compileAndRun(tlcSource)
832832
local code = "return 2 * 10 + (function() return 2 * 5 end)()"
File renamed without changes.

0 commit comments

Comments
 (0)