Don't know if my language is considered Lil' enough for this, but it's a pure, lazy functional language based upon Miranda (progenitor language to Haskell) that compiles to x86-64 asm. ~6700 SLOC for the (self-hosted!) compiler, and ~3300 SLOC additional for the extensive library of functional data structures and functions.<p><a href="https://github.com/taolson/Admiran" rel="nofollow">https://github.com/taolson/Admiran</a>
My little language Newt is 7 kloc. Dunno if it's worth including, it's mostly an exercise to learn how these things work and is not as polished as I'd like.<p>- Self-hosted<p>- Compiles to javascript<p>- Bidirectional typechecking with NbE (based on elaboration zoo)<p>- Dependent type checking<p>- type classes<p>- ADTs with dependent pattern matching<p>- TCO (trampoline for mutually tail recursive functions)<p>- Erasure of compile-time only values (0, ω quantities, but not linear)<p>- Web playground<p>- LSP (added this month)<p>- Syntax is similar to Agda / Idris / Haskell<p><a href="https://github.com/dunhamsteve/newt" rel="nofollow">https://github.com/dunhamsteve/newt</a>
loon is a lisp! <a href="https://github.com/ecto/loon" rel="nofollow">https://github.com/ecto/loon</a><p><pre><code> [type Shape
[Circle Float]
[Rect Float Float]]
[fn area [s]
[match s
[Circle r] => [* 3.14 r r]
[Rect w h] => [* w h]]]
[area [Circle 5.0]]</code></pre>
Fluent – 4K lines – including parser, interpreter, standard library, IDE, UI, docs, examples. Will grow though.<p><a href="https://github.com/mlajtos/fluent/blob/main/client.tsx" rel="nofollow">https://github.com/mlajtos/fluent/blob/main/client.tsx</a>
Another crazy one is SectorLISP, 223 lines of asm<p><a href="https://justine.lol/sectorlisp2/" rel="nofollow">https://justine.lol/sectorlisp2/</a>
The hardest part with small languages isn't the parser, it's the standard library and error messages. Getting a helpful IDE experience in that footprint is a significant engineering challenge.