diff options
Diffstat (limited to 'src/main/frege/buildclient/config/BuildParser.fr')
-rw-r--r-- | src/main/frege/buildclient/config/BuildParser.fr | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/frege/buildclient/config/BuildParser.fr b/src/main/frege/buildclient/config/BuildParser.fr index 367b177..961be01 100644 --- a/src/main/frege/buildclient/config/BuildParser.fr +++ b/src/main/frege/buildclient/config/BuildParser.fr @@ -113,3 +113,10 @@ findDirective name (directive:ds) | directive.name == name = Just directive | otherwise = findDirective name ds findDirective _ [] = Nothing + +findDirectives :: String -> [ASTDirective] -> [ASTDirective] +findDirectives = findDirectives' [] + where findDirectives' acc name (a:as) + | name == a.name = findDirectives' (a:acc) name as + | otherwise = findDirectives' acc name as + findDirectives' acc _ [] = acc |