diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index a9e2011..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "argon" -version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index fb194ed..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "argon" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/licence.md b/licence.md deleted file mode 100644 index cbb221b..0000000 --- a/licence.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Open Argon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/spec.md b/spec.md index 80060d6..689bf45 100644 --- a/spec.md +++ b/spec.md @@ -18,6 +18,7 @@ reused variables, and infomation for use in understanding the pseudo REGEX: - NAME = [a-zA-Z][a-za-z0-9]\* - spaces used in the pseudo REGEX should be taken as 1 or many spaces. +- there can be 0 or more spaces around any of the pseudo REGEX --- @@ -76,8 +77,8 @@ if the function does not return, then the value given is unknown/null `[{CODE}]` -a wrap is used to wrap code in square brackets. its used to create a memory stack, so variables set from -inside the wraps stack are deleted once the wrap is finished. +a wrap encloses code in square brackets. its used to create a new scope, so variables set from +inside the wraps scope are deleted once the wrap is finished. example: @@ -91,3 +92,22 @@ let name = unknown log('hello', name) log('we do not know your age anymore because it got deleted when the wrap finished.') ``` + +A wrap, unless specificifed otherwise, can have a return value. This value can be used as the value of the wrap. + +example: + +``` +const password = [ + let password = input("set password: ") + while len(password) < 8 [ + log("password must be longer then 8 characters!") + password = input("set password: ") + ] + return password +] + +log("your password is", password) +``` + +If the wrap does not take a return value, then the wrap passes the return value back to a parent wrap. diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}