aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-24 00:39:51 +0200
committerEugen Wissner <belka@caraus.de>2026-09-24 00:39:51 +0200
commitf7b035a505e86ad916a43ab1dc1a662a6066b011 (patch)
treea54369ae8ad56352d148c4583ab568f7d4869d30 /source
parent74e75e41fe12f19e5365a3152ffafa1a29376240 (diff)
downloadelna-f7b035a505e86ad916a43ab1dc1a662a6066b011.tar.gz
Move module heading to the top
Diffstat (limited to 'source')
-rw-r--r--source/cctype.elna1
-rw-r--r--source/command_line_interface.elna2
-rw-r--r--source/common.elna2
-rw-r--r--source/cstdio.elna1
-rw-r--r--source/cstdlib.elna1
-rw-r--r--source/cstring.elna1
-rw-r--r--source/lexer.elna2
-rw-r--r--source/main.elna8
8 files changed, 11 insertions, 7 deletions
diff --git a/source/cctype.elna b/source/cctype.elna
index 13dc50a..19c3491 100644
--- a/source/cctype.elna
+++ b/source/cctype.elna
@@ -1,6 +1,7 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
+module
proc isdigit*(c: Int ) -> Int
extern
diff --git a/source/command_line_interface.elna b/source/command_line_interface.elna
index 0feb53b..511d6a0 100644
--- a/source/command_line_interface.elna
+++ b/source/command_line_interface.elna
@@ -1,10 +1,10 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
-
(*
Command line handling.
*)
+module
import cstdlib, cstring, common
type
diff --git a/source/common.elna b/source/common.elna
index 0a50fe1..e31def8 100644
--- a/source/common.elna
+++ b/source/common.elna
@@ -1,7 +1,7 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
-
+module
import cstring, cstdio, cstdlib
type
diff --git a/source/cstdio.elna b/source/cstdio.elna
index bf74234..e69d81a 100644
--- a/source/cstdio.elna
+++ b/source/cstdio.elna
@@ -1,6 +1,7 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
+module
type
FILE* = extern
diff --git a/source/cstdlib.elna b/source/cstdlib.elna
index 09b1ddf..9b858e7 100644
--- a/source/cstdlib.elna
+++ b/source/cstdlib.elna
@@ -1,6 +1,7 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
+module
proc malloc*(size: Word) -> Pointer
extern
diff --git a/source/cstring.elna b/source/cstring.elna
index 70c468c..dcf9e6f 100644
--- a/source/cstring.elna
+++ b/source/cstring.elna
@@ -1,6 +1,7 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
+module
proc memset*(ptr: Pointer; c: Int; n: Word) -> ^Word8
extern
diff --git a/source/lexer.elna b/source/lexer.elna
index 1cfe097..bf1c449 100644
--- a/source/lexer.elna
+++ b/source/lexer.elna
@@ -1,7 +1,7 @@
(* This Source Code Form is subject to the terms of the Mozilla Public License,
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/. *)
-
+module
import cstdio, common, cstdlib
type
diff --git a/source/main.elna b/source/main.elna
index 955f313..adac5ac 100644
--- a/source/main.elna
+++ b/source/main.elna
@@ -2,7 +2,9 @@
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 cstdio, cstdlib, cstring, cctype, common, command_line_interface, lexer
+program(parameters)
+import
+ cstdio, cstdlib, cstring, cctype, common, command_line_interface, lexer
type
SourceFile* = record
@@ -825,10 +827,8 @@ begin
stderr := fdopen(2, "w\0".ptr)
return
-program(parameters)
begin
initialize_global_state();
-return cast(process(cast(parameters.length: Int), parameters.ptr): Word8)
-
+ exit(process(cast(parameters.length: Int), parameters.ptr))
end.