Wartbed:Script

From Dark Omen Wiki

Revision as of 16:56, 7 December 2009 by Mikademus (Talk | contribs)
Jump to: navigation, search

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"
Personal tools
communication