aboutsummaryrefslogtreecommitdiff
path: root/source/common.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-07-12 23:17:06 +0200
committerEugen Wissner <belka@caraus.de>2026-07-12 23:17:06 +0200
commitb2f8be605d2b79d1d4b1995646e7058bec299a22 (patch)
treeb5dd4a434103d440d7c541badc3cf3097e8ac967 /source/common.elna
parentfea8ff27f53f960ff7149b360446589a0748aeb5 (diff)
downloadelna-b2f8be605d2b79d1d4b1995646e7058bec299a22.tar.gz
Add fail_compilation tests
Diffstat (limited to 'source/common.elna')
-rw-r--r--source/common.elna15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/common.elna b/source/common.elna
index 7790faf..8bba90f 100644
--- a/source/common.elna
+++ b/source/common.elna
@@ -2,14 +2,17 @@
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/. *)
-import cstring, cstdio
+import cstring, cstdio, cstdlib
type
- Identifier = [256]Char
- TextLocation* = record
+ ElnaLocation* = record
line: Word;
column: Word
end
+ ElnaPosition* = record
+ start_location: ElnaLocation;
+ end_location: ElnaLocation
+ end
proc write*(fd: Int; buf: Pointer; Word: Int): Int
extern
@@ -69,4 +72,10 @@ begin
write_i(cast(value: Int))
end
+proc free_and_nil*(pointer: Pointer): Pointer
+begin
+ free(pointer);
+ return nil
+end
+
end.