1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
3 Copyright (C) 2009 Maxim Ermilov <zaspire@rambler.ru>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <glib-object.h>
29 #define JS_TYPE_NODE (js_node_get_type ())
30 #define JS_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JS_TYPE_NODE, JSNode))
31 #define JS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JS_TYPE_NODE, JSNodeClass))
32 #define JS_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JS_TYPE_NODE))
33 #define JS_IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JS_TYPE_NODE))
34 #define JS_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JS_TYPE_NODE, JSNodeClass))
36 typedef struct _JSNodeClass JSNodeClass
;
37 typedef struct _JSNode JSNode
;
41 GObjectClass parent_class
;
46 GObject parent_instance
;
53 struct { /* TOK_FUNCTION node */
58 struct { /* list of next-linked nodes */
61 struct { /* ternary: if, for(;;), ?: */
64 struct { /* two kids if binary */
68 struct { /* one kid if unary */
71 struct { /* name, labeled statement, etc. */
83 GType
js_node_get_type (void) G_GNUC_CONST
;
84 gchar
* js_node_get_name (JSNode
*node
);
85 JSNode
* js_node_new_from_file (const gchar
*name
);
86 GList
* js_node_get_list_member_from_rc (JSNode
* node
);
87 JSNode
* js_node_get_member_from_rc (JSNode
* node
, const gchar
*mname
);
88 GList
* js_node_get_lines_missed_semicolon (JSNode
*node
);
92 #endif /* _JS_NODE_H_ */