diff --git a/Aer-v1.0-Specification.md b/Aer-v1.0-Specification.md index 8a4ea23..ef0135e 100644 --- a/Aer-v1.0-Specification.md +++ b/Aer-v1.0-Specification.md @@ -35,7 +35,7 @@ White space is defined as any character with Unicode class Zs (which includes th There are several kinds of tokens: identifiers, keywords, literals, operators, and punctuators. White space and comments are not tokens, though they act as separators for tokens. #### 3.3.1 Literals -A literal is any notation for representing a value within the PHP source code. Technically, a literal is assigned a value at compile time, while a variable is assigned at runtime. Aer supports: +A literal is any notation for representing a value within the Aer source code. Technically, a literal is assigned a value at compile time, while a variable is assigned at runtime. Aer supports: * boolean literal (can be true or false), * integer literal (can be decimal and hexadecimal), * real literal (used to write values of float type), @@ -283,7 +283,7 @@ postfix notation (such as $x++), The order of evaluation of operators in an expression is determined by the precedence of the operators. ### 6.1. Operator Precedence -When an expression contains multiple operators, the precedence of the operators controls the order in which the individual operators are evaluated. The precedence of an operator is established by the definition of its associated grammar production. The following list shows common PHP operators ordered by precedence (highest precedence first): +When an expression contains multiple operators, the precedence of the operators controls the order in which the individual operators are evaluated. The precedence of an operator is established by the definition of its associated grammar production. The following list shows common AerScript operators ordered by precedence (highest precedence first): | Precedence | Description | Operator | Associativity | |------------|-----------------------|------------------|-------------------| @@ -385,16 +385,6 @@ Often there is a need to execute a statement if a certain condition is met, and print("a is NOT greater than b"); } -Additionally, Aer implements known from PHP, the elseif statement. as its name suggests, is a combination of if and else. Like else, it extends an if statement to execute a different statement in case the original if expression evaluates to FALSE. However, unlike else, it will execute that alternative expression only if the elseif conditional expression evaluates to TRUE. For example, the following code would display a is bigger than b, a equal to b or a is smaller than b: - - if ($a > $b) { - print("a is bigger than b"); - } elseif ($a == $b) { - print("a is equal to b"); - } else { - print("a is smaller than b"); - } - ### 7.2. Switch Statement The switch statement is a selection control flow statement. It allows the value of a variable or expression to control the flow of program execution via a multiway branch. It creates multiple branches in a simpler way than using the if, elseif statements. The switch statement works with two other keywords: case and break. The case keyword is used to test a label against a value from the round brackets. If the label equals to the value, the statement following the case is executed. The break keyword is used to jump out of the switch statement. There is an optional default statement. If none of the labels equals the value, the default statement is executed.