Skip to content

feat(dialect-yoruba): init#145

Open
PapePathe wants to merge 2 commits into
masterfrom
dialect-yoruba
Open

feat(dialect-yoruba): init#145
PapePathe wants to merge 2 commits into
masterfrom
dialect-yoruba

Conversation

@PapePathe
Copy link
Copy Markdown
Owner

@PapePathe PapePathe commented Mar 26, 2026

This pull request adds support for the yoruba dialect

èdè:yoruba;

bẹ̀rẹ̀() nọ́mbà{
  padà 0;
}
èdè:yoruba;

bẹ̀rẹ̀() nọ́mbà{
  bí(0 == 0) {
    tẹ̀jáde("of course");
  } míràn {
    tẹ̀jáde("oops!");
  }
  padà 0;
}
èdè:yoruba;

iṣẹ́ sum(list: [5]nọ́mbà) nọ́mbà {
  jẹ́ ret : nọ́mbà = 0;
  jẹ́ idx: nọ́mbà = 0;
  
  nígbàtí(idx < 5) {
    ret = ret + list[idx];
    idx = idx + 1;
  }

  padà ret;
}

iṣẹ́ sumf(list: [5]float) float {
  jẹ́ ret: float = 0.0;
  jẹ́ idx: nọ́mbà = 0;
  
  nígbàtí(idx < 5) {
    ret = ret + list[idx];
    idx = idx + 1;
  }

  padà ret;
}

bẹ̀rẹ̀ () nọ́mbà {
  jẹ́ list: [5]nọ́mbà = [5]nọ́mbà{ 1, 2, 3, 4 , 5};
  jẹ́ listf: [5]float = [5]float{ 1.00, 2.000, 3.000, 4.0 , 5.000000};
  jẹ́ sum_of_list: nọ́mbà = sum(list);
  jẹ́ sum_of_listf: float = sumf(listf);

  tẹ̀jáde("sum: %d, sumf: %.2f", sum_of_list, sum_of_listf);

  padà 0; 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant