Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
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 *]

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()

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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