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;
123 typedef struct _statement_t {
124 statement_type_t type;
125 struct _statement_t *next;
130 member_expression_t *expr;
136 member_expression_t *member_expr;
137 expression_t *value_expr;
138 } assign_statement_t;
140 typedef struct _dim_decl_t {
142 struct _dim_decl_t *next;
145 typedef struct _dim_statement_t {
147 dim_decl_t *dim_decls;
150 typedef struct _arg_decl_t {
153 struct _arg_decl_t *next;
156 typedef struct _function_decl_t {
158 function_type_t type;
162 struct _function_decl_t *next;
163 struct _function_decl_t *next_prop_func;
168 function_decl_t *func_decl;
169 } function_statement_t;
171 typedef struct _class_prop_decl_t {
174 struct _class_prop_decl_t *next;
177 typedef struct _class_decl_t {
179 function_decl_t *funcs;
180 class_prop_decl_t *props;
181 struct _class_decl_t *next;
184 typedef struct _elseif_decl_t {
187 struct _elseif_decl_t *next;
193 statement_t *if_stat;
194 elseif_decl_t *elseifs;
195 statement_t *else_stat;
206 const WCHAR *identifier;
207 expression_t *from_expr;
208 expression_t *to_expr;
209 expression_t *step_expr;
215 const WCHAR *identifier;
216 expression_t *group_expr;
218 } foreach_statement_t;
223 } onerror_statement_t;
225 typedef struct _const_decl_t {
227 expression_t *value_expr;
228 struct _const_decl_t *next;
241 BOOL option_explicit;
249 statement_t *stats_tail;
250 class_decl_t *class_decls;
255 HRESULT parse_script(parser_ctx_t*,const WCHAR*) DECLSPEC_HIDDEN;
256 void parser_release(parser_ctx_t*) DECLSPEC_HIDDEN;
257 int parser_lex(void*,parser_ctx_t*) DECLSPEC_HIDDEN;
258 void *parser_alloc(parser_ctx_t*,size_t) DECLSPEC_HIDDEN;