Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
69dcc641
Commit
69dcc641
authored
Sep 08, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Better function call parsing.
parent
1ac1ffba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
parser.y
dlls/vbscript/parser.y
+14
-2
run.c
dlls/vbscript/tests/run.c
+6
-0
No files found.
dlls/vbscript/parser.y
View file @
69dcc641
...
...
@@ -39,6 +39,8 @@ static member_expression_t *new_member_expression(parser_ctx_t*,expression_t*,co
static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*);
#define CHECK_ERROR if(((parser_ctx_t*)ctx)->hres != S_OK) YYABORT
%}
%pure_parser
...
...
@@ -47,6 +49,7 @@ static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*);
%union {
const WCHAR *string;
statement_t *statement;
expression_t *expression;
member_expression_t *member;
}
...
...
@@ -55,6 +58,7 @@ static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*);
%type <statement> Statement StatementNl
%type <member> MemberExpression
%type <expression> Arguments_opt ArgumentList_opt
%%
...
...
@@ -69,12 +73,20 @@ StatementNl
: Statement tNL { $$ = $1; }
Statement
: MemberExpression
/* FIXME: Arguments_opt */ { $$ = new_call_statement(ctx, $1)
; }
: MemberExpression
Arguments_opt { $1->args = $2; $$ = new_call_statement(ctx, $1); CHECK_ERROR
; }
MemberExpression
: tIdentifier { $$ = new_member_expression(ctx, NULL, $1); }
: tIdentifier { $$ = new_member_expression(ctx, NULL, $1);
CHECK_ERROR;
}
/* FIXME: MemberExpressionArgs '.' tIdentifier */
Arguments_opt
: /* empty */ { $$ = NULL; }
| '(' ArgumentList_opt ')' { $$ = $2; }
ArgumentList_opt
: /* empty */ { $$ = NULL; }
/* | ArgumentList { $$ = $1; } */
%%
static int parser_error(const char *str)
...
...
dlls/vbscript/tests/run.c
View file @
69dcc641
...
...
@@ -469,6 +469,12 @@ static void run_tests(void)
parse_script_a
(
"reportSuccess"
);
CHECK_CALLED
(
global_success_d
);
CHECK_CALLED
(
global_success_i
);
SET_EXPECT
(
global_success_d
);
SET_EXPECT
(
global_success_i
);
parse_script_a
(
"reportSuccess()"
);
CHECK_CALLED
(
global_success_d
);
CHECK_CALLED
(
global_success_i
);
}
static
BOOL
check_vbscript
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment