diff --git a/md/documents/comments.md b/md/documents/comments.md index de157e8..dc3f158 100644 --- a/md/documents/comments.md +++ b/md/documents/comments.md @@ -30,11 +30,11 @@ A comment always starts with two colons `::` and can be placed at the end of any ```xt :: This is a comment -out 5 :: This is a comment +prt 5 :: This is an inline comment ``` --- -Last Updated: February 6th, 2022 by Dm123321_31mD +Last Updated: April 9th, 2023 by iiPython [↑ Go To Top](#x--documents--comments) \ No newline at end of file diff --git a/md/documents/comparators.md b/md/documents/comparators.md index 2e55e5b..144373e 100644 --- a/md/documents/comparators.md +++ b/md/documents/comparators.md @@ -75,16 +75,16 @@ Or: "hello" in "hello world" ``` -An expression cannot be used on its own, as it is not considered as an operator and thus not a valid statement. It is always accompanied by operators that take an expression as an argument. A classic example of this is the `cmp` operator: +An expression cannot be used on its own, as it is not considered as an operator and thus not a valid statement. It is always accompanied by operators that take an expression as an argument. A classic example of this is the `if` operator: ```xt -cmp 5 == 5 "out \"true\"" +if (5 == 5) "prt 'true'" ``` -Any operator that uses an expression creates a branch, with `true` being the first branch and `false` is the second. For example, the `cmp` operator creates a branch based on whether or not the expression is true: +Any operator that uses an expression creates a branch, with `true` being the first branch and the second acts as an `else`. For example, the `if` operator creates a branch based on whether or not the expression is true: ```xt -cmp 5 == 10 "out \"same\"" "out \"different\"" +if (5 == 10) "prt 'same'" "prt 'different'" ``` ## Documentation @@ -105,7 +105,7 @@ Checks if the two variables or values are equal to each other. Example: ```xt -cmp 5 == 5 "out \"true\"" +if (5 == 5) "prt 'true'" ``` --- @@ -126,7 +126,7 @@ Checks if the two variables or values are different from each other. Example: ```xt -cmp 5 != 10 "out \"true\"" +if (5 != 10) "prt 'true'" ``` --- @@ -147,7 +147,7 @@ Checks if the source is less than the target. Example: ```xt -cmp 5 < 10 "out \"true\"" +if (5 < 10) "prt 'true'" ``` --- @@ -168,7 +168,7 @@ Checks if the source is less than or equal to the target. Example: ```xt -cmp 5 <= 10 "out \"true\"" +if (5 <= 10) "prt 'true'" ``` --- @@ -189,7 +189,7 @@ Checks if the source is greater than the target. Example: ```xt -cmp 10 > 5 "out \"true\"" +if (10 > 5) "prt 'true'" ``` --- @@ -210,7 +210,7 @@ Checks if the source is greater than or equal to the target. Example: ```xt -cmp 10 >= 5 "out \"true\"" +if (10 >= 5) "prt 'true'" ``` --- @@ -231,7 +231,7 @@ Checks if the source is in the target. Example: ```xt -cmp "ello" in "Hello, world!" "out \"true\"" +if ("ello" in "Hello, world!") "prt 'true'" ``` --- @@ -239,7 +239,7 @@ cmp "ello" in "Hello, world!" "out \"true\"" ### Not In ```xt - xin + not in ``` Checks if the source is not in the target. @@ -252,7 +252,7 @@ Checks if the source is not in the target. Example: ```xt -cmp "bye" xin "Hello, world!" "out \"true\"" +if ("bye" not in "Hello, world!") "prt 'true'" ``` --- @@ -273,33 +273,11 @@ Checks if the source is a type of the target. Example: ```xt -cmp 5 is "int" "out \"true\"" +if (5 is "int") "prt 'true'" ``` --- -### From - -```xt - from -``` - -Checks if the source is an instance of the target. - -| Parameter | Type | Description | -| :-: | :-: | :-: | -| Source | Any | The variable or value that is being compared against | -| Target | Any | The variable or value being compared to | - -Example: - -```xt -evl "setvar('int', int)" -cmp 5 from int "out \"true\"" -``` - ---- - -Last Updated: February 6th, 2022 by Dm123321_31mD +Last Updated: April 9th, 2023 by iiPython [↑ Go To Top](#x--documents--comparators) \ No newline at end of file diff --git a/md/documents/configurations.md b/md/documents/configurations.md index b22da5a..1018c88 100644 --- a/md/documents/configurations.md +++ b/md/documents/configurations.md @@ -29,34 +29,19 @@ - [Main](#main) -### Q - -- [Quiet](#quiet) - ## About The configuration file defines what the project would do on execution. It is always placed in the `.xtconfig` file and should be written as if it is within a `*.json` file. If one is not found in the project, the default configuration is used internally instead: -```xtconfig +```xconfig { - "main": "main.xt", - "quiet": false + "main": "main.xpp" } ``` -If an essential field is missing, it is replaced with a default value internally instead: - -```xtconfig -{ - "main": "main.xt" -} -``` - -> Because the `quiet` field is missing, its default value, `false`, is used instead. - The configuration file can also contain non-essential information, such as the author, version, or description of your project: -```xtconfig +```xconfig { "author": "my-name", "contributors": [ @@ -69,11 +54,13 @@ The configuration file can also contain non-essential information, such as the a } ``` +> This is part of the official .xconfig specification. In fact, `xpp --show ` will use this spec. + ## Documentation ### Main -```xtconfig +```xconfig { "main": } @@ -83,26 +70,10 @@ Defines the path of the main entry file. | Parameter | Type | Default | Description | | :-: | :-: | :-: | :-: | -| Path | String\ | "main.xt" | Main entry file path relative to the current working directory | - ---- - -### Quiet - -```xtconfig -{ - "quiet":