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
45 EXPR_NOARG
, /* not a real expression */
57 typedef struct _expression_t
{
58 expression_type_t type
;
59 struct _expression_t
*next
;
75 } double_expression_t
;
80 } string_expression_t
;
84 expression_t
*subexpr
;
91 } binary_expression_t
;
95 expression_t
*obj_expr
;
96 const WCHAR
*identifier
;
98 } member_expression_t
;
125 typedef struct _statement_t
{
126 statement_type_t type
;
127 struct _statement_t
*next
;
132 member_expression_t
*expr
;
138 member_expression_t
*member_expr
;
139 expression_t
*value_expr
;
140 } assign_statement_t
;
142 typedef struct _dim_list_t
{
144 struct _dim_list_t
*next
;
147 typedef struct _dim_decl_t
{
150 BOOL is_public
; /* Used only for class members. */
152 struct _dim_decl_t
*next
;
155 typedef struct _dim_statement_t
{
157 dim_decl_t
*dim_decls
;
160 typedef struct _arg_decl_t
{
163 struct _arg_decl_t
*next
;
166 typedef struct _function_decl_t
{
168 function_type_t type
;
172 struct _function_decl_t
*next
;
173 struct _function_decl_t
*next_prop_func
;
178 function_decl_t
*func_decl
;
179 } function_statement_t
;
181 typedef struct _class_decl_t
{
183 function_decl_t
*funcs
;
185 struct _class_decl_t
*next
;
188 typedef struct _elseif_decl_t
{
191 struct _elseif_decl_t
*next
;
197 statement_t
*if_stat
;
198 elseif_decl_t
*elseifs
;
199 statement_t
*else_stat
;
210 const WCHAR
*identifier
;
211 expression_t
*from_expr
;
212 expression_t
*to_expr
;
213 expression_t
*step_expr
;
219 const WCHAR
*identifier
;
220 expression_t
*group_expr
;
222 } foreach_statement_t
;
227 } onerror_statement_t
;
229 typedef struct _const_decl_t
{
231 expression_t
*value_expr
;
232 struct _const_decl_t
*next
;
240 typedef struct _case_clausule_t
{
243 struct _case_clausule_t
*next
;
249 case_clausule_t
*case_clausules
;
250 } select_statement_t
;
257 BOOL option_explicit
;
266 statement_t
*stats_tail
;
267 class_decl_t
*class_decls
;
272 HRESULT
parse_script(parser_ctx_t
*,const WCHAR
*,const WCHAR
*) DECLSPEC_HIDDEN
;
273 void parser_release(parser_ctx_t
*) DECLSPEC_HIDDEN
;
274 int parser_lex(void*,parser_ctx_t
*) DECLSPEC_HIDDEN
;
275 void *parser_alloc(parser_ctx_t
*,size_t) DECLSPEC_HIDDEN
;