mwg API
    Preparing search index...

    Function preprocess

    • Expands MWL macros, #ifdef blocks and #includes into flat source text, then rewrites the _("...") gettext marker into a form the JSON5 parser accepts. The marker keeps working because this pass already runs before structural parsing, the same reason macros survive a change of grammar.

      Parameters

      Returns string

      import { preprocess } from '@datamoc/mw_games/mwl';

      console.log(preprocess("[{ tag: 'game', schema: 0.1 }]"));