Wartbed:Script
From Dark Omen Wiki
Line 1: | Line 1: | ||
- | [[Script]] is the human-readable data format used by [[WARTBED]]. Though the Script parser is language-agnostic and can be set to interpret many languages, '''Script''' in WARTBED is a nested-bracers language loosely based on C syntax featuring nested scopes, block and line comments, and block and items having names, operators and values. Items are delimited by new lines or semicolon, and whitespace are legal characters inside strings, but will be trimmed. To keep leading or following whitespace in names or values citation marks (quotes) must be used. | + | [[WARTBED/Script|Script]] is the human-readable data format used by [[WARTBED]]. Though the Script parser is language-agnostic and can be set to interpret many languages, '''Script''' in WARTBED is a nested-bracers language loosely based on C syntax featuring nested scopes, block and line comments, and block and items having names, operators and values. Items are delimited by new lines or semicolon, and whitespace are legal characters inside strings, but will be trimmed. To keep leading or following whitespace in names or values citation marks (quotes) must be used. |
The current version of Script used in WARTBED is Script v2. The first version of script used colon as separator between item name and value, required items to be terminated with semicolon, and did not allow blocks to have separators and values. | The current version of Script used in WARTBED is Script v2. The first version of script used colon as separator between item name and value, required items to be terminated with semicolon, and did not allow blocks to have separators and values. |
Revision as of 16:33, 16 February 2009
Script is the human-readable data format used by WARTBED. Though the Script parser is language-agnostic and can be set to interpret many languages, Script in WARTBED is a nested-bracers language loosely based on C syntax featuring nested scopes, block and line comments, and block and items having names, operators and values. Items are delimited by new lines or semicolon, and whitespace are legal characters inside strings, but will be trimmed. To keep leading or following whitespace in names or values citation marks (quotes) must be used.
The current version of Script used in WARTBED is Script v2. The first version of script used colon as separator between item name and value, required items to be terminated with semicolon, and did not allow blocks to have separators and values.
Example Script v2 code:
the first block { my value = 10 and my name is = a secret; inner block -= something{ /* empty */ } } " a final item " += " huluuuu"