Treelang

1 program Added 2026-02-26T00:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: —
Provenance: commit 765c64a7e6 · authored 2026-02-26T14:19:25+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

2 sources · pl_id: pl/treelang
LLM (this repo) · 1Pldb

Related languages

Slang (0.31)D (0.27)Fetlang (0.27)V (0.27)Xtlang (0.27)

LLM-contributed programs

Arithmetic Functions Demo

Provenance: commit 765c64a7e6 · authored 2026-02-26T14:19:25+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.tree · added: 2026-02-26T00:00:00Z
external_definition int add(int arg1, int arg2);
external_definition int subtract(int arg3, int arg4);
external_definition int first_nonzero(int arg5, int arg6);
external_definition int double_plus_one(int arg7);

add
{
  return arg1 + arg2;
}

subtract
{
  return arg3 - arg4;
}

double_plus_one
{
  automatic int aaa;
  aaa=add(arg7, arg7);
  aaa=add(aaa, aaa);
  aaa=subtract(subtract(aaa, arg7), arg7) + 1;
  return aaa;
}

first_nonzero
{
  if (arg5)
  {
    return arg5;
  }
  else
  {
  }
  return arg6;
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Treelang (mapped to pl/treelang). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Treelang/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Treehugger Treescript →