Skip to content

Commit

Permalink
fix: indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
skifli authored Jan 2, 2025
1 parent c429961 commit b57fbba
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 35 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"editor.fontLigatures": true,
"editor.fontSize": 11,
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.guides.bracketPairs": true,
"editor.insertSpaces": true,
"editor.insertSpaces": false,
"editor.tabSize": 3,
"editor.smoothScrolling": true,
"editor.suggest.localityBonus": true,
Expand Down
20 changes: 10 additions & 10 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
cff-version: 1.2.0
title: The Exeme Language
message: >-
If you use this software, please cite it using the
metadata from this file.
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Aneeq
family-names: W
orcid: 'https://orcid.org/0009-0004-6637-3341'
- given-names: Aneeq
family-names: W
orcid: 'https://orcid.org/0009-0004-6637-3341'
repository-code: 'https://github.com/exeme-project/exeme-lang'
url: 'https://exeme-project.github.io/exeme-lang'
abstract: 'An optimised, elegant, and compiled programming language. '
keywords:
- programming
- language
- optimised
- elegant
- compiled
- programming
- language
- optimised
- elegant
- compiled
license: MIT
12 changes: 6 additions & 6 deletions lib/std-exl/std.exl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class str {
_char_buf: *i8,
_length: i64,
_char_buf: *i8,
_length: i64,

func __init__(self: *str) -> NULL {
self._char_buf = NULL
self.length = 0
}
func __init__(self: *str) -> NULL {
self._char_buf = NULL
self.length = 0
}
}
18 changes: 9 additions & 9 deletions lib/std-llvm-ir/std.ll
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
%str = type {
i8*, ; 0: _char_buf - pointer to the character buffer
i64, ; 1: length - number of characters in the buffer
i8*, ; 0: _char_buf - pointer to the character buffer
i64, ; 1: length - number of characters in the buffer
}

define void @str_SEP___init__(%str* %self, i8* %string) nounwind {
; Initiailise '_char_buf'
%1 = getelementptr %str* %self, i64 0, i64, 0 ; get pointer to '_char_buf'
store i8* null, i8** %1 ; store null pointer
; Initiailise '_char_buf'
%1 = getelementptr %str* %self, i64 0, i64, 0 ; get pointer to '_char_buf'
store i8* null, i8** %1 ; store null pointer

; Initiailise 'length'
%2 = getelementptr %str* %self, i64 0, i64 1 ; get pointer to 'length'
store i64 0, i64* %2 ; store 0
; Initiailise 'length'
%2 = getelementptr %str* %self, i64 0, i64 1 ; get pointer to 'length'
store i64 0, i64* %2 ; store 0

ret void
ret void
}
14 changes: 7 additions & 7 deletions programs/main.exl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use io::out

; Returns whether `n` itself is prime.
fun isPrime(n: i32) -> bool {
for _, d = range(2, n) { ; '_' is the index, but it is not needed
if n % d == 0 { ; Can be divided without a remainder
return false
}
}
for _, d = range(2, n) { ; '_' is the index, but it is not needed
if n % d == 0 { ; Can be divided without a remainder
return false
}
}

return true
return true
}

fun main() {
out(isPrime(100))
out(isPrime(100))
}
4 changes: 2 additions & 2 deletions src/utils/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ void array___realloc(struct Array *self, size_t new_length) {
memset(self->_values + self->length, 0,
(new_length - self->length) *
ARRAY_STRUCT_ELEMENT_SIZE); // Zero out the new memory. First parameter is the pointer for the array,
// starting from where we reallocated from. The third parameter is the
// size of the newly allocated memory.
// starting from where we reallocated from. The third parameter is the
// size of the newly allocated memory.
}

if (!self->_values) {
Expand Down

0 comments on commit b57fbba

Please sign in to comment.