MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / isProgram

Function isProgram

lib/compilers/pascal-utils.ts:25–28  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

23// POSSIBILITY OF SUCH DAMAGE.
24
25export function isProgram(source: string) {
26 const re = /\s?program\s+([\w.-]*);/i;
27 return !!re.test(source);
28}
29
30export function isUnit(source: string) {
31 const re = /\s?unit\s+([\w.-]*);/i;

Callers

nothing calls this directly

Calls 1

testMethod · 0.80

Tested by

no test coverage detected