A downloadable programming language for Windows

A simple low-level C like language compiler.

features

  • compile source code to a single .cpp file or .exe (.exe requires visual studio)
  • order independent declarations
  • modules instead of #include (no header files and no manual dependency sorting )
  • simple syntax
  • function and operator overloading
  • function call semantics to reduce wrapper functions (defaults, varying arguments, type expansion)
  • function types can be used to ensure a function maintains an interface, without copy pasting interface signatures
  • interfacing with libraries by declare bindings to .dll and .lib
  • arrays with size and pointer with static and dynamic bound checks
  • unions and structs field access of expanded fields (e.g. player.name, instead of player.entity.name)
  • runtime type information
  • simple type inference on initialization
  • modules for interfacing with win32 API and OpenGL
  • tetris-clone example project in 3D
  • modules and example code are free to use in any way (MIT license)

usage

  • lang -cpp outputfile.cpp <files and directories>
  • lang -exe output.exe <files and directories> (in visual studio command prompt)
  • Example: build.bat (in visual studio command prompt, in tetris directory)

restrictions

  • requires C++ compiler to build executables (tested with MSVC)
  • platform modules only available for windows (win32)
  • work in progress, updated infrequently

Download

Download
lang_23_01_32_demo.zip 665 kB

Comments

Log in with itch.io to leave a comment.

(+1)

New Update 2023_01_31:

  • compiler restructuring and bug fixes 
  • module updates and bug fixes
  • yes the project is still alive and kicking!

New Update 2022_08_29:

  • Fixed byte count computation on pointers
  • Improvements for print
  • Added expand for function struct arguments, so you can pass the individual struct fields, instead of the struct
  • More error checking and fixes
  • Module updates and fixes

New Update 2022_08_25:

  • More error checking
  • Internal simplifications and stability improvements
  • Some C output formatting cleanup
  • Updated modules.
(+1)

New Update: union support and expand keyword in unions and scructs.