AlDanial / cloc

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.
GNU General Public License v2.0
19.75k stars 1.02k forks source link

Pawn language #843

Closed Tornamic closed 4 months ago

Tornamic commented 4 months ago

If you want an unsupported language added, provide:

For other enhancements: Give a concise description of what you want cloc to be able to do.

AlDanial commented 4 months ago

The .inc extention makes things difficult as it already maps to three languages:

» cloc --show-ext | grep ^inc
inc             -> PHP/Pascal/Fortran

Adding Pawn means updating subroutine php_pascal_or_fortran() that attempts to distinguish Pawn code from these three. Can you recommend heuristics for this?

Tornamic commented 4 months ago

some unique and popular expressions

#pragma
#error
#define
#endinput
Float:
bool:
new
static
stock
forward
#include
#undef
defined