Permalink
Browse files

mergeSupport recursive blocks

  • Loading branch information...
raphink authored and domenkozar committed Nov 13, 2012
1 parent d89cf72 commit 9ca1843813202be89ed665340f38f16386320685
Showing with 11 additions and 26 deletions.
  1. +11 −26 bacula.aug
View
@@ -42,10 +42,10 @@ module Bacula =
let line (sto:lens) = [ sto . comment_or_eol ]
let line_noeol (sto:lens) = [ sto . comment_or_semicolon ]
- let block =
- let entry = Util.empty | (indent . (line keyvalue|line include))
- in let entry_noindent = line keyvalue | line include
- in let entry_noindent_noeol = line_noeol keyvalue | line_noeol include
+ let rec block =
+ let entry = Util.empty | (indent . (line keyvalue|line include|block))
+ in let entry_noindent = line keyvalue | line include | block
+ in let entry_noindent_noeol = line_noeol keyvalue | line_noeol include | block
in let entry_noeol = indent . entry_noindent_noeol
in [ label "@block" . store /[a-zA-Z]+/
. Build.block_generic
@@ -164,26 +164,11 @@ module Bacula =
{ "@block" = "Storage"
{ "Name" = "kaki-sd" }
}
-
- (* recursive directives *)
- test Bacula.lns get "FileSet {
- Name = \"DefaultSet\"
- Include {
- Options {
- signature = SHA1
- noatime = yes
- }
- File = /etc
- }
-}" =
- {"FileSet"
- {"Name" = "DefaultSet"}
- {"Include"
- {"Options"
- {"signature" = "SHA1"}
- {"noatime" = "yes"}
- }
- {"File" = "/etc"}
- }
- }
+ (* recursive directives *)
+ test Bacula.lns get "FileSet { Include { signature = SHA1 } }" =
+ { "@block" = "FileSet"
+ { "@block" = "Include"
+ { "signature" = "SHA1" }
+ }
+ }

0 comments on commit 9ca1843

Please sign in to comment.