Add line number to parser nodes
authorEtienne Bergeron <etienneb@google.com>
Tue, 2 Apr 2013 23:24:22 +0000 (19:24 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 2 Apr 2013 23:24:53 +0000 (19:24 -0400)
Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-ast.h
formats/ctf/metadata/ctf-parser.y

index 136862710d42df1c8c0d6cdcf45921d23bafd578..042726e9edc35d9dea049b3ee235701b74da0e0d 100644 (file)
@@ -76,6 +76,7 @@ struct ctf_node {
        struct bt_list_head siblings;
        struct bt_list_head tmp_head;
        struct bt_list_head gc;
+       unsigned int lineno;
 
        enum node_type type;
        union {
index 6397f428c99ab196e85202a9077a06b4d105659b..30f4c949870bb53e86a40f6cbf565f60a0f8ee3c 100644 (file)
@@ -250,6 +250,7 @@ static struct ctf_node *make_node(struct ctf_scanner *scanner,
                return NULL;
        memset(node, 0, sizeof(*node));
        node->type = type;
+       node->lineno = yyget_lineno(scanner->scanner);
        BT_INIT_LIST_HEAD(&node->tmp_head);
        bt_list_add(&node->gc, &ast->allocated_nodes);
        bt_list_add(&node->siblings, &node->tmp_head);
This page took 0.025486 seconds and 4 git commands to generate.