Skip to content

Commit 61c410f

Browse files
committed
docs: update README to use new modular API shortcuts
1 parent a3bd6e1 commit 61c410f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ local source = [[
6666
-- -----------------------
6767

6868
-- Tokenize: Raw text -> Stream of tokens
69-
local tokens = tlc.Tokenizer.new(source):tokenize()
69+
local tokens = tlc.tokenize(source)
7070

7171
-- Parse: Stream of tokens -> Abstract Syntax Tree (AST)
72-
local ast = tlc.Parser.new(tokens):parse()
72+
local ast = tlc.parseTokens(tokens)
7373

7474
-- Generate Code: AST -> Function Prototype (Intermediate Representation)
75-
local proto = tlc.CodeGenerator.new(ast):generate()
75+
local proto = tlc.generate(ast)
7676

7777
-- 3. Execution
7878
-- Run the prototype in the Virtual Machine
79-
tlc.VirtualMachine.new(proto):execute()
79+
tlc.execute(proto)
8080

8181
--[[
8282
EXPECTED OUTPUT:

0 commit comments

Comments
 (0)