mwg API
    Preparing search index...

    Function parse

    • Parses MWL source (a top-level array of { tag, ...attrs, children } objects, or the equivalent named-node sugar such as { unit_type: { id: 'hero' } }) into nodes. Numbers and booleans become their string form on the node, so the schema, compiler, and runtime see exactly the strings they always have; the JSON5 literal only decides what an author types and what a JSON5-aware tool can check before validation runs.

      Parameters

      • source: string
      • file: string = '<mwl>'

      Returns MwlNode[]