Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/compiler-explorer/compiler-explorer
/ isUnit
Function
isUnit
lib/compilers/pascal-utils.ts:30–33 ·
view source on GitHub ↗
(source: string)
Source
from the content-addressed store, hash-verified
28
}
29
30
export
function
isUnit(source: string) {
31
const
re = /\s?unit\s+([\w.-]*);/i;
32
return
!!re.test(source);
33
}
34
35
export
function
getUnitname(source: string) {
36
const
re = /\s?unit\s+([\w.-]*);/i;
Callers
nothing calls this directly
Calls
1
test
Method · 0.80
Tested by
no test coverage detected