Polyman Documentation - v3.0.0
    Preparing search index...

    Function resolveSourceType

    • Picks the Polygon sourceType for a file: the value declared in Config.json wins; otherwise it is inferred from the extension.

      Parameters

      • filename: string

        File name (extension decides the fallback)

      • Optionaldeclared: string

        sourceType from the config entry, if any

      Returns string

      Polygon compiler identifier (e.g. cpp.gcc14-64-msys2-g++23)

      resolveSourceType('sol.cc');                              // 'cpp.g++17'
      resolveSourceType('sol.cpp', 'cpp.gcc14-64-msys2-g++23'); // declared wins
      resolveSourceType('Sol.java'); // 'java11'