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_list_t
{
143 struct _dim_list_t
*next
;
146 typedef struct _dim_decl_t
{
149 BOOL is_public
; /* Used only for class members. */
151 struct _dim_decl_t
*next
;
154 typedef struct _dim_statement_t
{
156 dim_decl_t
*dim_decls
;
159 typedef struct _arg_decl_t
{
162 struct _arg_decl_t
*next
;
165 typedef struct _function_decl_t
{
167 function_type_t type
;
171 struct _function_decl_t
*next
;
172 struct _function_decl_t
*next_prop_func
;
177 function_decl_t
*func_decl
;
178 } function_statement_t
;
180 typedef struct _class_decl_t
{
182 function_decl_t
*funcs
;
184 struct _class_decl_t
*next
;
187 typedef struct _elseif_decl_t
{
190 struct _elseif_decl_t
*next
;
196 statement_t
*if_stat
;
197 elseif_decl_t
*elseifs
;
198 statement_t
*else_stat
;
209 const WCHAR
*identifier
;
210 expression_t
*from_expr
;
211 expression_t
*to_expr
;
212 expression_t
*step_expr
;
218 const WCHAR
*identifier
;
219 expression_t
*group_expr
;
221 } foreach_statement_t
;
226 } onerror_statement_t
;
228 typedef struct _const_decl_t
{
230 expression_t
*value_expr
;
231 struct _const_decl_t
*next
;
239 typedef struct _case_clausule_t
{
242 struct _case_clausule_t
*next
;
248 case_clausule_t
*case_clausules
;
249 } select_statement_t
;
256 BOOL option_explicit
;
265 statement_t
*stats_tail
;
266 class_decl_t
*class_decls
;
271 HRESULT
parse_script(parser_ctx_t
*,const WCHAR
*,const WCHAR
*) DECLSPEC_HIDDEN
;
272 void parser_release(parser_ctx_t
*) DECLSPEC_HIDDEN
;
273 int parser_lex(void*,parser_ctx_t
*) DECLSPEC_HIDDEN
;
274 void *parser_alloc(parser_ctx_t
*,size_t) DECLSPEC_HIDDEN
;