Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Archived

This topic is now archived and is closed to further replies.

tpzker

KLang: C++-styled programming language using Lua.

Recommended Posts

Hello. I recently started creating a C++-styled Lua programming language. Currently, it is not quite done yet, but you can feel free to contribute to the project as a whole.

Site: https://thepuzzlemaker.github.io/KLang

GitHub: https://github.com/ThePuzzlemaker/KLang

Advantages

  • Header Files
  • Compilation to Lua
  • Static and Dynamic Libraries

Roadmap

  1. Actual parsing
  2. Compilation to Lua
  3. Headers
  4. Dynamic/Static Libraries
  5. Core libraries*
  6. Other stuff not planned yet :P

EDIT: It turns out I was able to just pull the lexer out of Penlight, and change the 'file' and 'path' Penlight libraries to the 'filesystem' API.

The branch "opencomputers" of the GitHub is the branch that deals with OC. Pretty self-explanatory :P

network library will have sockets (Entering personal opinion in 3...2...1...)!!!!!1111! sockets [open a socket to any client on port * and allow an object-oriented stream to send to client and receive from client] > normal [listen on port *]

Share this post


Link to post
Share on other sites

The core libraries will just be KLang code compiled to a library, then put into some kind of library folder.

For static libraries, the compiler will probably just put in that library into the beginning of the compiled Lua file (from KLang file).

For dynamic libraries, I'm not quite sure yet.

With that way, theoretically, you can link a dynamic library as a static library or a static library as a dynamic library

I earlier drafted up this example of a compiled file with a dynamic library:

lk = require("lk")
lk.link("core")
lk.link("test-library")
lk.header("test-library/hello.h")

test-library.hello()

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.