Repository navigation
π± v0.1.0 β First Release!
A complete LOLCODE 1.2 compiler for .NET 10. Write LOLCODE, get real .NET assemblies.
HAI 1.2
VISIBLE "OH HAI! I CAN HAZ COMPILER!"
KTHXBYE⨠What's Included
Full LOLCODE 1.2 Language Support
- Variables & Types β NUMBR (int), NUMBAR (float), YARN (string), TROOF (bool), NOOB (null)
- Math β
SUM OF,DIFF OF,PRODUKT OF,QUOSHUNT OF,MOD OF,BIGGR OF,SMALLR OF - Booleans β
BOTH OF,EITHER OF,WON OF,NOT,ALL OF,ANY OF - Comparison β
BOTH SAEM,DIFFRINT(no auto-casting, per spec) - Conditionals β
O RLY?/YA RLY/MEBBE/NO WAI/OIC - Switch β
WTF?/OMG/OMGWTFwith fall-through semantics - Loops β
IM IN YRwithUPPIN,NERFIN,TIL,WILE,GTFO - Functions β
HOW IZ I/IF U SAY SO/FOUND YR/I IZ func MKAY - Casting β
MAEK x A NUMBR,x IS NOW A YARN - Strings β
SMOOSHconcatenation,:{var}interpolation, escape sequences (:),:>,::,:",:o) - I/O β
VISIBLE(print with infinite arity),GIMMEH(read input) - Comments β
BTW(line),OBTW...TLDR(block) - IT β Implicit per-scope variable, auto-returned from functions
Roslyn-Inspired Compiler Architecture
Hand-rolled, multi-phase compiler β no parser generators, no transpiling to C#:
Source (.lol) β Lexer β Parser β Binder β Lowerer β CodeGenerator β .NET DLL
- Rich diagnostics with source location, line/column info, and
LOLxxxxerror codes - Immutable syntax and bound trees
- Each phase independently testable
MSBuild SDK Integration
Build LOLCODE with standard .NET tooling:
dotnet new install Lolcode.NET.Templates
dotnet new lolcode -n MyApp
cd MyApp
dotnet run # β HAI WORLD!File-Based Apps
No project file needed:
echo '#:sdk Lolcode.NET.Sdk
HAI 1.2
VISIBLE "HAI WORLD!"
KTHXBYE' > hello.lol
dotnet run --file hello.lol16 Sample Programs
Organized into categories with dotnet run support:
- Basics (9) β hello-world, variables, math, conditionals, loops, functions, string-ops, casting, switch
- Programs (4) β fizzbuzz, fibonacci, recursion, string-calculator
- Games (3) β guessing-game, adventure-game, arena-game
289 Tests Across 2 Projects
- Unit tests β Lexer (32), Parser (25), Runtime (86)
- End-to-end tests β 19 category classes covering every language feature
- SDK integration tests β all 16 samples verified
π¦ NuGet Packages
| Package | Description |
|---|---|
Lolcode.NET.Sdk |
MSBuild SDK for .lolproj projects |
Lolcode.Runtime |
Runtime library for compiled LOLCODE programs |
Lolcode.NET.Templates |
dotnet new lolcode project template |
π Quick Start
# Install the template
dotnet new install Lolcode.NET.Templates
# Create and run a LOLCODE app
dotnet new lolcode -n MyApp
cd MyApp
dotnet runRequirements
- .NET 10 SDK
Full Changelog: https://github.com/mattleibow/dotnet-lolcode/commits/v0.1.0