Engine:CCMD run: Difference between revisions

395 bytes added ,  15 October 2023
Line 17: Line 17:


=== Script statement syntax ===
=== Script statement syntax ===
In the examples in these descriptions, a space ' ' is the same as any whitespace except newline, and all of the newline chars are represented by just '\n', to make easier to read.
:1. 'Statements' are text blocks that begin with a command name, and are followed by any other text, and end with line-end or semi-colon. A new statement can begin adjacent to the previous statements ending delimiter.
:1. 'Statements' are text blocks that begin with a command name, and are followed by any other text, and end with line-end or semi-colon. A new statement can begin adjacent to the previous statements ending delimiter.
:2. Command names begin or end at white-space, semi-colon, or line-end, and end at comment start.
::<kua>statement[\n;]statement[\n;]...</kua>
:2. Command names begin or end at white-space, text start or end, semi-colon, or line-end, and end at comment start.
::<kua>command</kua>
::<kua>[ ;\n]command[ \n]</kua>
::<kua>command//comment</kua>
:3. Other text starts after any white-space after command name, until semi-colon, line-end, or comment start.
:3. Other text starts after any white-space after command name, until semi-colon, line-end, or comment start.
::<kua>command other[;\n]</kua>
::<kua>command other//comment</kua>
:4. Comment text starts with '//', placed anywhere on a line, and includes all text until line-end.
:4. Comment text starts with '//', placed anywhere on a line, and includes all text until line-end.
:5. Comment text, empty statements or lines, or statements or lines with only white-space, will be skipped.
:5. Comment text, empty statements or lines, or statements or lines with only white-space, will be skipped.