-
Notifications
You must be signed in to change notification settings - Fork 4
Version 2.0
Techcraft7 edited this page Dec 25, 2020
·
11 revisions
- New interpreter, builds a node tree of the program before running. Takes longer to run initially, but will be faster in the long run for long programs. (The old system ran everything from tokens)
- Backend is more object-oriented, most code is abstracted into classes for easy maintainability
- Libraries are imported while building the tree instead of when the import statement is reached in the code.
- Way easier/faster to add more syntax! (So faster updates!)
- Attribute based JSON docs
- Enum-based expression types. Adding an expression type is just adding an enum field, and another case in two switch statements, and then the node class itself. See
ExpressionType.csand the_7Sharp.Interpreter.Nodesnamespace for examples.
A built in system for viewing quick and simple docs on functions and more!
Use man list for a list of topics
Use man <topic> to view the topic page. All docs are based off JSON code in attributes in the code!
See the "Creating a Shell Plugin" page to learn more!
Warning: len([1,2,3]) will not work, due to the inability to customize the expression evaluator for custom array syntax
array = [1,2,3];
loop (len(array)) {
write(array[getLoopIndex()]);
}Output:
1
2
3
- Trig functions (
sin(x),cos(x),tan(x),asin(x),acos(x),atan(x),atan2(x, y)) - Degrees <--> Radians (
deg2rad(x),rad2deg(x)) -
resetColor()reset console colors
