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

    Function solutionLanguage

    • Works out which language a solution runs as locally. Only the file extension decides, with the same checks getCompiledCommandToRun uses to pick the program, so the factor always matches how the file is really run. sourceType is ignored here: it does not change the language, it can only pick the C++ standard (see compileSolution).

      Parameters

      Returns SolutionLanguage | undefined

      The language, or undefined if polyman cannot tell

      solutionLanguage({ name: 'main', source: 'main.cpp', tag: 'MA' }); // 'cpp'
      solutionLanguage({ name: 'slow', source: 'Main.java', tag: 'OK' }); // 'java'