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
56 typedef struct _expression_t {
57 expression_type_t type;
58 struct _expression_t *next;
74 } double_expression_t;
79 } string_expression_t;
83 expression_t *subexpr;
90 } binary_expression_t;
94 expression_t *obj_expr;
95 const WCHAR *identifier;
97 } member_expression_t;
124 typedef struct _statement_t {
125 statement_type_t type;
126 struct _statement_t *next;
131 member_expression_t *expr;
137 member_expression_t *member_expr;
138 expression_t *value_expr;
139 } assign_statement_t;
141 typedef struct _dim_decl_t {
143 struct _dim_decl_t *next;
146 typedef struct _dim_statement_t {
148 dim_decl_t *dim_decls;
151 typedef struct _arg_decl_t {
154 struct _arg_decl_t *next;
157 typedef struct _function_decl_t {
159 function_type_t type;
163 struct _function_decl_t *next;
164 struct _function_decl_t *next_prop_func;
169 function_decl_t *func_decl;
170 } function_statement_t;
172 typedef struct _class_prop_decl_t {
175 struct _class_prop_decl_t *next;
178 typedef struct _class_decl_t {
180 function_decl_t *funcs;
181 class_prop_decl_t *props;
182 struct _class_decl_t *next;
185 typedef struct _elseif_decl_t {
188 struct _elseif_decl_t *next;
194 statement_t *if_stat;
195 elseif_decl_t *elseifs;
196 statement_t *else_stat;
207 const WCHAR *identifier;
208 expression_t *from_expr;
209 expression_t *to_expr;
210 expression_t *step_expr;
216 const WCHAR *identifier;
217 expression_t *group_expr;
219 } foreach_statement_t;
224 } onerror_statement_t;
226 typedef struct _const_decl_t {
228 expression_t *value_expr;
229 struct _const_decl_t *next;
237 typedef struct _case_clausule_t {
240 struct _case_clausule_t *next;
246 case_clausule_t *case_clausules;
247 } select_statement_t;
254 BOOL option_explicit;
262 statement_t *stats_tail;
263 class_decl_t *class_decls;
268 HRESULT parse_script(parser_ctx_t*,const WCHAR*) DECLSPEC_HIDDEN;
269 void parser_release(parser_ctx_t*) DECLSPEC_HIDDEN;
270 int parser_lex(void*,parser_ctx_t*) DECLSPEC_HIDDEN;
271 void *parser_alloc(parser_ctx_t*,size_t) DECLSPEC_HIDDEN;