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
49 EXPR_NOARG
, /* not a real expression */
59 typedef struct _expression_t
{
60 expression_type_t type
;
61 struct _expression_t
*next
;
82 } double_expression_t
;
87 } string_expression_t
;
91 expression_t
*subexpr
;
98 } binary_expression_t
;
102 expression_t
*obj_expr
;
103 const WCHAR
*identifier
;
104 } member_expression_t
;
108 expression_t
*call_expr
;
140 typedef struct _statement_t
{
141 statement_type_t type
;
143 struct _statement_t
*next
;
148 call_expression_t
*expr
;
153 expression_t
*left_expr
;
154 expression_t
*value_expr
;
155 } assign_statement_t
;
157 typedef struct _dim_list_t
{
159 struct _dim_list_t
*next
;
162 typedef struct _dim_decl_t
{
165 BOOL is_public
; /* Used only for class members. */
167 struct _dim_decl_t
*next
;
170 typedef struct _dim_statement_t
{
172 dim_decl_t
*dim_decls
;
175 typedef struct _redim_decl_t
{
176 const WCHAR
*identifier
;
178 struct _redim_decl_t
*next
;
184 redim_decl_t
*redim_decls
;
187 typedef struct _arg_decl_t
{
190 struct _arg_decl_t
*next
;
193 typedef struct _function_decl_t
{
195 function_type_t type
;
200 struct _function_decl_t
*next
;
201 struct _function_decl_t
*next_prop_func
;
206 function_decl_t
*func_decl
;
207 } function_statement_t
;
209 typedef struct _class_decl_t
{
211 function_decl_t
*funcs
;
213 struct _class_decl_t
*next
;
216 typedef struct _elseif_decl_t
{
220 struct _elseif_decl_t
*next
;
226 statement_t
*if_stat
;
227 elseif_decl_t
*elseifs
;
228 statement_t
*else_stat
;
239 const WCHAR
*identifier
;
240 expression_t
*from_expr
;
241 expression_t
*to_expr
;
242 expression_t
*step_expr
;
248 const WCHAR
*identifier
;
249 expression_t
*group_expr
;
251 } foreach_statement_t
;
256 } onerror_statement_t
;
258 typedef struct _const_decl_t
{
260 expression_t
*value_expr
;
261 struct _const_decl_t
*next
;
269 typedef struct _case_clausule_t
{
272 struct _case_clausule_t
*next
;
278 case_clausule_t
*case_clausules
;
279 } select_statement_t
;
290 } retval_statement_t
;
297 BOOL option_explicit
;
307 statement_t
*stats_tail
;
308 class_decl_t
*class_decls
;
313 HRESULT
parse_script(parser_ctx_t
*,const WCHAR
*,const WCHAR
*,DWORD
) DECLSPEC_HIDDEN
;
314 void parser_release(parser_ctx_t
*) DECLSPEC_HIDDEN
;
315 int parser_lex(void*,unsigned*,parser_ctx_t
*) DECLSPEC_HIDDEN
;
316 void *parser_alloc(parser_ctx_t
*,size_t) DECLSPEC_HIDDEN
;