- Added strings and the
import
keyword. Currently, strings are used only to specify the path after theimport
keyword. Theimport
keyword allows you to execute code from a file at the specified path using the current interpreter.Write(AnyVariable);
data AnyVariable: 3; import "../Test.apl";
- Added the ability to specify paths as interpreter launch arguments, thereby importing other scripts immediately upon execution.
APL.exe ../Test1.apl ../Test2.apl
- Added the future to call functions. Currently, there is only the
Write(...Values)
function instead of theprint
keyword.Write(E, Pi);
- Optimized code execution in the following areas:
- token parsing,
- keyword recognition,
- token sequence traversal,
- creation of regions in brackets,
- tree parsing for various operations,
- evaluation of the tree from different nodes.
- Fixed token position detection.
- Any error now includes its position.
- Fixed parsing errors with multiple brackets.
Write((1 + 1) * (1 + 1));
- Temporarily removed unstable operators
+:
,-:
,*:
,/:
. - Interpreter split into parts for easier management. Code simplified using patterns.
- Parser structure changed. Pointer tracking during code reading implemented. Parser errors now indicate error location.
print(1 + ); Expected expression at line 1 column 9
- Keyword
print
now requires parentheses.print(E * PI);
- Added operators
+:
,-:
,*:
,/:
.data A; A +: 3; A : A + 3;
- Optimized token parsing.
- Added the keyword
null
. To use a missing value, it's necessary to explicitly usenull
. The absence of a value is no longer automatically considered asnull
.data A : null;
- Improved recognition of semicolons.
- Now the initial variables
E
andPi
are considered non-writable. Their values cannot be changed. - Improved adaptability and interpretation of variables.
print(data A : 5);
- Fixed a bug where it was possible to initialize a variable with itself.
- Now you can execute code with multiple instructions.
data A : 1; data B : 2; print(A); print(B);
- Added the ability to work with signed numbers. For example:
+2
,-4
.print(7 + -4);
- Improved language adaptability. Now, the absence of a value anywhere will be interpreted as
null
;data A : (); print(A);
- Changed syntax. Now it's mandatory to put a semicolon after each instruction.
- Optimized parsing of code in brackets.
- Improved error descriptions.
- Added the ability to put a semicolon at the end of a line. It can also be omitted.
- Added the ability to declare variables, initialize them, and change their values.
- Now, only data in the
print()
key block will be output to the console.
First stable version