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
48 EXPR_NOARG
, /* not a real expression */
58 typedef struct _expression_t
{
59 expression_type_t type
;
60 struct _expression_t
*next
;
76 } double_expression_t
;
81 } string_expression_t
;
85 expression_t
*subexpr
;
92 } binary_expression_t
;
96 expression_t
*obj_expr
;
97 const WCHAR
*identifier
;
98 } member_expression_t
;
102 expression_t
*call_expr
;
134 typedef struct _statement_t
{
135 statement_type_t type
;
137 struct _statement_t
*next
;
142 call_expression_t
*expr
;
147 expression_t
*left_expr
;
148 expression_t
*value_expr
;
149 } assign_statement_t
;
151 typedef struct _dim_list_t
{
153 struct _dim_list_t
*next
;
156 typedef struct _dim_decl_t
{
159 BOOL is_public
; /* Used only for class members. */
161 struct _dim_decl_t
*next
;
164 typedef struct _dim_statement_t
{
166 dim_decl_t
*dim_decls
;
171 const WCHAR
*identifier
;
176 typedef struct _arg_decl_t
{
179 struct _arg_decl_t
*next
;
182 typedef struct _function_decl_t
{
184 function_type_t type
;
189 struct _function_decl_t
*next
;
190 struct _function_decl_t
*next_prop_func
;
195 function_decl_t
*func_decl
;
196 } function_statement_t
;
198 typedef struct _class_decl_t
{
200 function_decl_t
*funcs
;
202 struct _class_decl_t
*next
;
205 typedef struct _elseif_decl_t
{
209 struct _elseif_decl_t
*next
;
215 statement_t
*if_stat
;
216 elseif_decl_t
*elseifs
;
217 statement_t
*else_stat
;
228 const WCHAR
*identifier
;
229 expression_t
*from_expr
;
230 expression_t
*to_expr
;
231 expression_t
*step_expr
;
237 const WCHAR
*identifier
;
238 expression_t
*group_expr
;
240 } foreach_statement_t
;
245 } onerror_statement_t
;
247 typedef struct _const_decl_t
{
249 expression_t
*value_expr
;
250 struct _const_decl_t
*next
;
258 typedef struct _case_clausule_t
{
261 struct _case_clausule_t
*next
;
267 case_clausule_t
*case_clausules
;
268 } select_statement_t
;
279 } retval_statement_t
;
286 BOOL option_explicit
;
295 statement_t
*stats_tail
;
296 class_decl_t
*class_decls
;
301 HRESULT
parse_script(parser_ctx_t
*,const WCHAR
*,const WCHAR
*,DWORD
) DECLSPEC_HIDDEN
;
302 void parser_release(parser_ctx_t
*) DECLSPEC_HIDDEN
;
303 int parser_lex(void*,unsigned*,parser_ctx_t
*) DECLSPEC_HIDDEN
;
304 void *parser_alloc(parser_ctx_t
*,size_t) DECLSPEC_HIDDEN
;