summaryrefslogtreecommitdiff
path: root/src/webidl-ast.h
blob: 6c61de944426b8f30ae89c2e1705a49080503fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Web IDL AST interface 
 *
 * This file is part of nsgenjsbind.
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
 */

#ifndef genjsbind_webidl_ast_h
#define genjsbind_webidl_ast_h

enum webidl_node_type {
	WEBIDL_NODE_TYPE_ROOT = 0,

};

struct webidl_node {
	int type;
	struct webidl_node *l;
	union {
		struct webidl_node *node;
		char *text;
	} r;
};


/** parse web idl file */
int webidl_parsefile(char *filename, struct webidl_node **webidl_ast);

struct webidl_node *webidl_node_new(int type, struct webidl_node *l, void *r);

struct webidl_node *webidl_node_link(struct webidl_node *tgt, struct webidl_node *src);

#endif