(source: string)
| 33 | } |
| 34 | |
| 35 | export function getUnitname(source: string) { |
| 36 | const re = /\s?unit\s+([\w.-]*);/i; |
| 37 | const match = source.match(re); |
| 38 | if (match) { |
| 39 | return match[1]; |
| 40 | } |
| 41 | |
| 42 | return 'example'; |
| 43 | } |
| 44 | |
| 45 | export function getProgName(source: string) { |
| 46 | const re = /\s?program\s+([\w.-]*);/i; |