summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2017-01-14 14:22:28 +0700
committerDaniil Baturin <daniil@baturin.org>2017-01-14 14:22:28 +0700
commitfa6a9c8b5d8d127bbce810aa14d4468de437469f (patch)
tree977b3648fbe567fd8ce2219e62a34751811ce2b4
parentbab64ac54eb9865c48dcc75ee398953374f5be37 (diff)
downloadvyconf-fa6a9c8b5d8d127bbce810aa14d4468de437469f.tar.gz
vyconf-fa6a9c8b5d8d127bbce810aa14d4468de437469f.zip
Break some overly long lines in the curly config parser.
-rw-r--r--src/curly_parser.mly18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/curly_parser.mly b/src/curly_parser.mly
index 54443b5..be5aadc 100644
--- a/src/curly_parser.mly
+++ b/src/curly_parser.mly
@@ -56,16 +56,20 @@ values:
;
leaf_node:
- | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL); name = IDENTIFIER; values = values; SEMI
+ | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL);
+ name = IDENTIFIER; values = values; SEMI
{ Vytree.make_full {values=(List.rev values); comment=comment; inactive=inactive; ephemeral=ephemeral} name []}
- | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL); name = IDENTIFIER; SEMI (* valueless node *)
+ | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL);
+ name = IDENTIFIER; SEMI (* valueless node *)
{ Vytree.make_full {default_data with comment=comment; inactive=inactive; ephemeral=ephemeral} name [] }
;
node:
- | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL); name = IDENTIFIER; LEFT_BRACE; children = list(node_content); RIGHT_BRACE
+ | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL);
+ name = IDENTIFIER; LEFT_BRACE; children = list(node_content); RIGHT_BRACE
{
- let node = Vytree.make_full {default_data with comment=comment; inactive=inactive; ephemeral=ephemeral} name [] in
+ let node =
+ Vytree.make_full {default_data with comment=comment; inactive=inactive; ephemeral=ephemeral} name [] in
let node = List.fold_left Vytree.adopt node (List.rev children) |> Vytree.merge_children merge_data in
try
List.iter find_duplicate_children (Vytree.children_of_node node);
@@ -77,10 +81,12 @@ node:
;
tag_node:
- | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL); name = IDENTIFIER; tag = IDENTIFIER; LEFT_BRACE; children = list(node_content); RIGHT_BRACE
+ | comment = opt_comment; inactive = boption(INACTIVE); ephemeral = boption(EPHEMERAL);
+ name = IDENTIFIER; tag = IDENTIFIER; LEFT_BRACE; children = list(node_content); RIGHT_BRACE
{
let outer_node = Vytree.make_full default_data name [] in
- let inner_node = Vytree.make_full {default_data with comment=comment; inactive=inactive; ephemeral=ephemeral} tag [] in
+ let inner_node =
+ Vytree.make_full {default_data with comment=comment; inactive=inactive; ephemeral=ephemeral} tag [] in
let inner_node = List.fold_left Vytree.adopt inner_node (List.rev children) |> Vytree.merge_children merge_data in
let node = Vytree.adopt outer_node inner_node in
try