2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
55 typedef struct _expression_t {
56 expression_type_t type;
57 struct _expression_t *next;
73 } double_expression_t;
78 } string_expression_t;
82 expression_t *subexpr;
89 } binary_expression_t;
93 expression_t *obj_expr;
94 const WCHAR *identifier;
96 } member_expression_t;
120 typedef struct _statement_t {
121 statement_type_t type;
122 struct _statement_t *next;
127 member_expression_t *expr;
132 member_expression_t *member_expr;
133 expression_t *value_expr;
134 } assign_statement_t;
136 typedef struct _dim_decl_t {
138 struct _dim_decl_t *next;
141 typedef struct _dim_statement_t {
143 dim_decl_t *dim_decls;
146 typedef struct _arg_decl_t {
149 struct _arg_decl_t *next;
152 typedef struct _function_decl_t {
154 function_type_t type;
158 struct _function_decl_t *next;
159 struct _function_decl_t *next_prop_func;
164 function_decl_t *func_decl;
165 } function_statement_t;
167 typedef struct _class_prop_decl_t {
170 struct _class_prop_decl_t *next;
173 typedef struct _class_decl_t {
175 function_decl_t *funcs;
176 class_prop_decl_t *props;
177 struct _class_decl_t *next;
180 typedef struct _elseif_decl_t {
183 struct _elseif_decl_t *next;
189 statement_t *if_stat;
190 elseif_decl_t *elseifs;
191 statement_t *else_stat;
202 const WCHAR *identifier;
203 expression_t *from_expr;
204 expression_t *to_expr;
205 expression_t *step_expr;
212 } onerror_statement_t;
214 typedef struct _const_decl_t {
216 expression_t *value_expr;
217 struct _const_decl_t *next;
230 BOOL option_explicit;
238 statement_t *stats_tail;
239 class_decl_t *class_decls;
244 HRESULT parse_script(parser_ctx_t*,const WCHAR*) DECLSPEC_HIDDEN;
245 void parser_release(parser_ctx_t*) DECLSPEC_HIDDEN;
246 int parser_lex(void*,parser_ctx_t*) DECLSPEC_HIDDEN;
247 void *parser_alloc(parser_ctx_t*,size_t) DECLSPEC_HIDDEN;