From 11f9c56ae3861e32ac45785e9f30ed5f4c19ea32 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 9 Aug 2021 14:27:15 -0400 Subject: Fill out some of chapter 2 --- spec/1 - language.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/1 - language.md') diff --git a/spec/1 - language.md b/spec/1 - language.md index cb03215..3e7aaa4 100644 --- a/spec/1 - language.md +++ b/spec/1 - language.md @@ -18,7 +18,7 @@ TNSL files contain the .tnsl extension and contain one or more of the following: - Method and interface blocks - Constant, variable, and type definitions -TNSL files may only contain the following enclosed in function blocks: +TNSL files may only contain the following enclosed in function or method blocks: - Re-assignment of variables - Control flow blocks - Use of variables in definition of variables @@ -113,6 +113,8 @@ TNSL functions may have their call stack modified by the `raw` and/or `inline` k The use of the `raw` keyword has several effects: the function will have no generated assembly preamble, the function will allow `raw return` statements, the function will not be optimized, and the function will allow `asm` statements. Any function may be labeled `raw`, even `main` and anonymous functions. +Functions *may* be overloaded (that is, two functions may share names but have differing input type lists). Overloaded functions *may not* share the same inputs and differing outputs, but *may* have both differing inputs and differing outputs. + Examples: # simple function with no inputs or outputs named "my_function" -- cgit v1.2.3