summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-28 02:58:26 +0700
committerDaniil Baturin <daniil@baturin.org>2018-05-28 02:58:26 +0700
commit0c95ae363b8afda675a34e1ccf6dea101a2b737e (patch)
treee65b90d96e5a6fb963d5ef680d5f0d2890d60d51
parent517f9cf752cfd9cef86b05b2bd8934b48f11d402 (diff)
downloadlibvyosconfig-0c95ae363b8afda675a34e1ccf6dea101a2b737e.tar.gz
libvyosconfig-0c95ae363b8afda675a34e1ccf6dea101a2b737e.zip
Use the ephemeral flag for marking tag nodes at parsing time.
-rw-r--r--lib/vyos1x_parser.mly4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vyos1x_parser.mly b/lib/vyos1x_parser.mly
index 04f2843..f786c7a 100644
--- a/lib/vyos1x_parser.mly
+++ b/lib/vyos1x_parser.mly
@@ -80,9 +80,9 @@ tag_node:
| comment = comments;
name = IDENTIFIER; tag = value; LEFT_BRACE; children = list(node_content); RIGHT_BRACE
{
- let outer_node = Vytree.make_full default_data name [] in
+ let outer_node = Vytree.make_full {default_data with ephemeral=true} name [] in
let inner_node =
- Vytree.make_full {default_data with comment=comment; ephemeral=true} tag [] in
+ Vytree.make_full {default_data with comment=comment} 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