diff --git a/src/app/docs/lang/lang.component.html b/src/app/docs/lang/lang.component.html index 910d3d7c..b5b3027b 100644 --- a/src/app/docs/lang/lang.component.html +++ b/src/app/docs/lang/lang.component.html @@ -43,6 +43,30 @@
+ Statements may optionally have parameters. Parameters start with
+ the (
character and end with the )
character.
+ Each parameter has a name
and a value
.
+
+ // statement with 1 parameter
+ statement(name: value);
+
+ // parameters are allowed on block statements as well
+ statement(name: value, name_two: value_two) {{'{}'}}
+
+ statement(name); // 'value' is `true` because it was ommitted
+ statement(name: true); // this is equivalent to the above
+
+
+ + Parameters are part of the syntax of the Ecsact language, but that doesn't + mean all statements allow all parameters. It is an error to give a statement + a parameter it does not support. +
+Top level statements are separated into 3 sections.
Systems that have a @@ -262,6 +287,26 @@
+ Systems can be marked as lazy with the lazy
+ parameter.
+ The lazy
parameter accepts an integer or a boolean as a value.
+ The value of the parameter determines how many times a system implementation
+ may be executed. A value of false
or 0
means the
+ system is not lazy. A value of true
means 1
.
+
+ // Run this expensive system at most 50 times per execution
+ system(lazy: 50) {{'{'}}
+ readwrite CollisionBox;
+ system ExpensiveSystem {{'{'}}
+ readwrite CollisionBox;
+ adds Colliding;
+ {{'}'}}
+ {{'}'}}
+
+
Both components and actions may contain any number of fields