Compare commits

...

2 Commits

Author SHA1 Message Date
c2a087785e Update README and lib docs 2025-07-14 02:28:01 +03:00
1b9f3dbca0 Fix warnings 2025-07-14 02:26:55 +03:00
7 changed files with 8 additions and 15 deletions

View File

@ -33,7 +33,7 @@ fn fibonacci(n: u16) -> u16 {
```
Currently missing relevant features (TODOs) are:
- Arrays
- ~~Arrays~~ (DONE)
- Structs (and custom types as such)
- Extern functions
- Strings

View File

@ -351,7 +351,6 @@ impl InstructionHolder {
),
ArrayAlloca(ty, len) => {
let array_len = ConstValue::U16(*len as u16).as_llvm(module.context_ref);
let array_ty = Type::Ptr(Box::new(ty.clone()));
LLVMBuildArrayAlloca(
module.builder_ref,
ty.as_llvm(module.context_ref),

View File

@ -1,7 +1,7 @@
// Arithmetic, function calls and imports!
fn array() -> [[u16; 4]; 1] {
return [[10, 15, 7, 9]];
fn array() -> [[[u16; 4]; 1]; 1] {
return [[[10, 15, 7, 9]]];
}
fn main() -> u16 {
@ -9,7 +9,7 @@ fn main() -> u16 {
let mut list = array();
list[0][3] = 5;
list[0][0][3] = 5;
return list[0][3];
return list[0][0][3];
}

View File

@ -155,8 +155,6 @@ impl<'ctx, 'a> Scope<'ctx, 'a> {
impl IndexedVariableReference {
fn get_stack_value(&self, scope: &mut Scope) -> Option<(StackValue, Vec<u32>)> {
use StackValueKind as Kind;
match &self.kind {
mir::IndexedVariableReferenceKind::Named(NamedVariableRef(_, name, _)) => scope
.stack_values

View File

@ -32,7 +32,7 @@
//! }
//!
//! Currently missing relevant features (TODOs) are:
//! - Arrays
//! - ~~Arrays~~ (DONE)
//! - Structs (and custom types as such)
//! - Extern functions
//! - Strings

View File

@ -4,7 +4,7 @@
//! must then be passed through TypeCheck with the same [`TypeRefs`] in order to
//! place the correct types from the IDs and check that there are no issues.
use std::{convert::Infallible, iter};
use std::iter;
use crate::{mir::TypeKind, util::try_all};

View File

@ -1,8 +1,4 @@
use super::{
pass::{ScopeVariable, Storage},
typecheck::ErrorKind,
*,
};
use super::*;
#[derive(Debug, Clone)]
pub enum ReturnTypeOther {