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
fb5509ec
Commit
fb5509ec
authored
Sep 12, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added negation expression parser/compiler implementation.
parent
a5fe24c6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
3 deletions
+18
-3
compile.c
dlls/vbscript/compile.c
+2
-0
interp.c
dlls/vbscript/interp.c
+6
-0
parse.h
dlls/vbscript/parse.h
+1
-0
parser.y
dlls/vbscript/parser.y
+8
-3
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/compile.c
View file @
fb5509ec
...
...
@@ -246,6 +246,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_equal
);
case
EXPR_MEMBER
:
return
compile_member_expression
(
ctx
,
(
member_expression_t
*
)
expr
,
TRUE
);
case
EXPR_NEG
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_neg
);
case
EXPR_NOT
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_not
);
case
EXPR_NULL
:
...
...
dlls/vbscript/interp.c
View file @
fb5509ec
...
...
@@ -391,6 +391,12 @@ static HRESULT interp_concat(exec_ctx_t *ctx)
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_neg
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
const
instr_func_t
op_funcs
[]
=
{
#define X(x,n,a,b) interp_ ## x,
OP_LIST
...
...
dlls/vbscript/parse.h
View file @
fb5509ec
...
...
@@ -23,6 +23,7 @@ typedef enum {
EXPR_EMPTY
,
EXPR_EQUAL
,
EXPR_MEMBER
,
EXPR_NEG
,
EXPR_NOT
,
EXPR_NULL
,
EXPR_STRING
,
...
...
dlls/vbscript/parser.y
View file @
fb5509ec
...
...
@@ -84,7 +84,7 @@ static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*);
%type <statement> Statement StatementNl
%type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression CallExpression
%type <expression> ConcatExpression AdditiveExpression
%type <expression> NotExpression
%type <expression> NotExpression
UnaryExpression
%type <member> MemberExpression
%type <expression> Arguments_opt ArgumentList_opt ArgumentList
%type <bool> OptionExplicit_opt
...
...
@@ -145,8 +145,13 @@ ConcatExpression
| ConcatExpression '&' AdditiveExpression { $$ = new_binary_expression(ctx, EXPR_CONCAT, $1, $3); CHECK_ERROR; }
AdditiveExpression
: LiteralExpression /* FIXME */ { $$ = $1; }
| CallExpression /* FIXME */ { $$ = $1; }
: UnaryExpression /* FIXME */ { $$ = $1; }
UnaryExpression
: LiteralExpression { $$ = $1; }
| CallExpression { $$ = $1; }
| '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
CallExpression
: PrimaryExpression { $$ = $1; }
...
...
dlls/vbscript/vbscript.h
View file @
fb5509ec
...
...
@@ -96,6 +96,7 @@ typedef enum {
X(icall, 1, ARG_BSTR, ARG_UINT) \
X(icallv, 1, ARG_BSTR, ARG_UINT) \
X(long, 1, ARG_INT, 0) \
X(neg, 1, 0, 0) \
X(not, 1, 0, 0) \
X(null, 1, 0, 0) \
X(ret, 0, 0, 0) \
...
...
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