Module script

Source
Expand description

§Syntax of paradox script

Offenly paradox scripts are written in .txt format. The syntax is highly similar to JSON, however, with slight differences. Some main differences are:

  • = is used instead of : to separate keys and values.
  • There exist some other kinds of separators, including ?= and <= (operators).
  • , is not used to separate key-value pairs.
  • Single value without key is allowed.
  • Keys and values are usually not enclosed in "", except for some special cases like specifying file paths.

Nevertheless, it is still very similar to JSON. We can define a simple syntax to parse the paradox scripts.

Modules§

types
Expose the types (Key, Unit, Value, Entry) to the outside. For convenience.

Structs§

Key
Key. An entry.
Units
A script is a list of units.

Enums§

Entry
Entry. Can be:
Unit
Unit. May be:
Value
Value. Can be:

Functions§

parse_file
Parse a given paradox file.