Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
12b1bcdb
Commit
12b1bcdb
authored
Jan 22, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Simplify option explicit parsing.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b2de64ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
parser.y
dlls/vbscript/parser.y
+4
-10
No files found.
dlls/vbscript/parser.y
View file @
12b1bcdb
...
@@ -27,7 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
...
@@ -27,7 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
static int parser_error(unsigned*,parser_ctx_t*,const char*);
static int parser_error(unsigned*,parser_ctx_t*,const char*);
static void parse_complete(parser_ctx_t*,BOOL);
static void handle_isexpression_script(parser_ctx_t *ctx, expression_t *expr);
static void handle_isexpression_script(parser_ctx_t *ctx, expression_t *expr);
static void source_add_statement(parser_ctx_t*,statement_t*);
static void source_add_statement(parser_ctx_t*,statement_t*);
...
@@ -138,7 +137,7 @@ static statement_t *link_statements(statement_t*,statement_t*);
...
@@ -138,7 +137,7 @@ static statement_t *link_statements(statement_t*,statement_t*);
%type <expression> ConstExpression NumericLiteralExpression
%type <expression> ConstExpression NumericLiteralExpression
%type <member> MemberExpression
%type <member> MemberExpression
%type <expression> Arguments Arguments_opt ArgumentList ArgumentList_opt Step_opt ExpressionList
%type <expression> Arguments Arguments_opt ArgumentList ArgumentList_opt Step_opt ExpressionList
%type <boolean>
OptionExplicit_opt
DoType Preserve_opt
%type <boolean> DoType Preserve_opt
%type <arg_decl> ArgumentsDecl_opt ArgumentDeclList ArgumentDecl
%type <arg_decl> ArgumentsDecl_opt ArgumentDeclList ArgumentDecl
%type <func_decl> FunctionDecl PropertyDecl
%type <func_decl> FunctionDecl PropertyDecl
%type <elseif> ElseIfs_opt ElseIfs ElseIf
%type <elseif> ElseIfs_opt ElseIfs ElseIf
...
@@ -153,12 +152,12 @@ static statement_t *link_statements(statement_t*,statement_t*);
...
@@ -153,12 +152,12 @@ static statement_t *link_statements(statement_t*,statement_t*);
%%
%%
Program
Program
: OptionExplicit_opt SourceElements
{ parse_complete(ctx, $1); }
: OptionExplicit_opt SourceElements
| tEXPRESSION ExpressionNl_opt { handle_isexpression_script(ctx, $2); }
| tEXPRESSION ExpressionNl_opt { handle_isexpression_script(ctx, $2); }
OptionExplicit_opt
OptionExplicit_opt
: /* empty */
{ $$ = FALSE; }
: /* empty */
| tOPTION tEXPLICIT StSep
{ $$
= TRUE; }
| tOPTION tEXPLICIT StSep
{ ctx->option_explicit
= TRUE; }
SourceElements
SourceElements
: /* empty */
: /* empty */
...
@@ -534,11 +533,6 @@ static void source_add_class(parser_ctx_t *ctx, class_decl_t *class_decl)
...
@@ -534,11 +533,6 @@ static void source_add_class(parser_ctx_t *ctx, class_decl_t *class_decl)
ctx->class_decls = class_decl;
ctx->class_decls = class_decl;
}
}
static void parse_complete(parser_ctx_t *ctx, BOOL option_explicit)
{
ctx->option_explicit = option_explicit;
}
static void handle_isexpression_script(parser_ctx_t *ctx, expression_t *expr)
static void handle_isexpression_script(parser_ctx_t *ctx, expression_t *expr)
{
{
retval_statement_t *stat;
retval_statement_t *stat;
...
...
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