aboutsummaryrefslogtreecommitdiff
path: root/source/main.elna
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.elna')
-rw-r--r--source/main.elna34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/main.elna b/source/main.elna
index db5e76f..468556d 100644
--- a/source/main.elna
+++ b/source/main.elna
@@ -41,15 +41,15 @@ type
(*
Standard procedures.
*)
-proc reallocarray(ptr: Pointer, n: Word, size: Word) -> Pointer
+proc reallocarray(ptr: Pointer; n: Word; size: Word) -> Pointer
return realloc(ptr, n * size)
end
-proc substring(string: String, start: Word, count: Word) -> String
+proc substring(string: String; start: Word; count: Word) -> String
return String(string.ptr + start, count)
end
-proc open_substring(string: String, start: Word) -> String
+proc open_substring(string: String; start: Word) -> String
return substring(string, start, string.length - start)
end
@@ -74,7 +74,7 @@ begin
return result
end
-proc string_buffer_push(buffer: ^StringBuffer, char: Char)
+proc string_buffer_push(buffer: ^StringBuffer; char: Char)
begin
if buffer^.size >= buffer^.capacity then
buffer^.capacity := buffer^.capacity + 1024u;
@@ -84,7 +84,7 @@ begin
buffer^.size := buffer^.size + 1u
end
-proc string_buffer_pop(buffer: ^StringBuffer, count: Word)
+proc string_buffer_pop(buffer: ^StringBuffer; count: Word)
begin
buffer^.size := buffer^.size - count
end
@@ -170,7 +170,7 @@ begin
source_code^.position.column := 0u
end
-proc source_code_expect(source_code: ^SourceCode, expected: Char) -> Bool
+proc source_code_expect(source_code: ^SourceCode; expected: Char) -> Bool
return ~source_code_empty(source_code) & source_code_head(source_code^) = expected
end
@@ -178,7 +178,7 @@ end
Token procedures.
*)
-proc lexer_escape(escape: Char, result: ^Char) -> Bool
+proc lexer_escape(escape: Char; result: ^Char) -> Bool
var
successful: Bool
begin
@@ -236,7 +236,7 @@ proc lexer_is_ident(char: Char) -> Bool
return isalnum(cast(char: Int)) <> 0 or char = '_'
end
-proc lexer_identifier(source_code: ^SourceCode, token_content: ^StringBuffer)
+proc lexer_identifier(source_code: ^SourceCode; token_content: ^StringBuffer)
var
content_length: Word
begin
@@ -246,7 +246,7 @@ begin
end
end
-proc lexer_comment(source_code: ^SourceCode, token_content: ^StringBuffer) -> Bool
+proc lexer_comment(source_code: ^SourceCode; token_content: ^StringBuffer) -> Bool
var
trailing: Word
begin
@@ -269,7 +269,7 @@ begin
return trailing = 2u
end
-proc lexer_character(source_code: ^SourceCode, token_content: ^Char) -> Bool
+proc lexer_character(source_code: ^SourceCode; token_content: ^Char) -> Bool
var
successful: Bool
begin
@@ -291,7 +291,7 @@ begin
return successful
end
-proc lexer_string(source_code: ^SourceCode, token_content: ^StringBuffer) -> Bool
+proc lexer_string(source_code: ^SourceCode; token_content: ^StringBuffer) -> Bool
var
token_end, constructed_string: ^Char
token_length: Word
@@ -314,7 +314,7 @@ begin
return is_valid
end
-proc lexer_number(source_code: ^SourceCode, token_content: ^Int)
+proc lexer_number(source_code: ^SourceCode; token_content: ^Int)
begin
token_content^ := 0;
@@ -394,7 +394,7 @@ begin
return current_token
end
-proc lexer_add_token(lexer: ^Tokenizer, token: Token)
+proc lexer_add_token(lexer: ^Tokenizer; token: Token)
var
new_length: Word
begin
@@ -405,7 +405,7 @@ begin
end
(* Read the next token from the input. *)
-proc lexer_next(source_code: SourceCode, token_buffer: ^StringBuffer) -> Token
+proc lexer_next(source_code: SourceCode; token_buffer: ^StringBuffer) -> Token
var
current_token: Token
first_char: Char
@@ -611,7 +611,7 @@ end
Parser.
*)
-proc parse(tokens: ^Token, tokens_size: Word)
+proc parse(tokens: ^Token; tokens_size: Word)
var
current_token: ^Token
i: Word := 0u
@@ -773,7 +773,7 @@ end
Compilation entry.
*)
-proc compile_in_stages(command_line: ^CommandLine, source_code: SourceCode) -> Int
+proc compile_in_stages(command_line: ^CommandLine; source_code: SourceCode) -> Int
var
return_code: Int := 0
lexer: Tokenizer
@@ -788,7 +788,7 @@ begin
return return_code
end
-proc process(argc: Int, argv: ^^Char) -> Int
+proc process(argc: Int; argv: ^^Char) -> Int
var
tokens: ^Token
tokens_size: Word