plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


748c4d4 — Peter John 2026-11-03T14:50:51+05:30
own: carry isOwn through trait and embed lowering
plum-core/src/embeds.rs CHANGED
@@ -563,7 +563,7 @@ fn processRecord(source: &mut Source, rname: &str, cx: &mut Ctx) {
563
563
  cx.standIn.insert(
564
564
  rname.to_string(),
565
565
  TraitDecl {
566
- isOwn: false,
566
+ isOwn: source.items.iter().any(|i| matches!(i, Item::Enum(e) if e.name == rname && e.isOwn)),
567
567
  name: rname.to_string(),
568
568
  line: init.as_ref().map(|f| f.line).unwrap_or(0),
569
569
  column: init.as_ref().map(|f| f.column).unwrap_or(0),
plum-core/src/traits.rs CHANGED
@@ -250,7 +250,7 @@ isOwn: false,
250
250
  })
251
251
  .collect();
252
252
  let e = Enum {
253
- isOwn: false,
253
+ isOwn: t.isOwn,
254
254
  name: t.name.clone(),
255
255
  line: t.line,
256
256
  column: t.column,