From b57fbba6b3d3830c9fa348834f885df7c3275c9f Mon Sep 17 00:00:00 2001 From: skifli <121291719+skifli@users.noreply.github.com> Date: Thu, 2 Jan 2025 12:43:59 +0000 Subject: [PATCH] fix: indentations --- .vscode/settings.json | 3 ++- CITATION.cff | 20 ++++++++++---------- lib/std-exl/std.exl | 12 ++++++------ lib/std-llvm-ir/std.ll | 18 +++++++++--------- programs/main.exl | 14 +++++++------- src/utils/array.c | 4 ++-- 6 files changed, 36 insertions(+), 35 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d40ea8c..b2205dd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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, diff --git a/CITATION.cff b/CITATION.cff index 84ba2e6..3de6fe0 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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 diff --git a/lib/std-exl/std.exl b/lib/std-exl/std.exl index 194d1dc..e870787 100644 --- a/lib/std-exl/std.exl +++ b/lib/std-exl/std.exl @@ -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 + } } diff --git a/lib/std-llvm-ir/std.ll b/lib/std-llvm-ir/std.ll index c6954eb..212defb 100644 --- a/lib/std-llvm-ir/std.ll +++ b/lib/std-llvm-ir/std.ll @@ -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 } diff --git a/programs/main.exl b/programs/main.exl index a6435dc..443de22 100644 --- a/programs/main.exl +++ b/programs/main.exl @@ -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)) } diff --git a/src/utils/array.c b/src/utils/array.c index 5d8e7bb..d8af476 100644 --- a/src/utils/array.c +++ b/src/utils/array.c @@ -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) {