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
408a1bf6
Commit
408a1bf6
authored
Sep 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added new expression parser/compiler implemetation.
parent
f683832a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
0 deletions
+25
-0
compile.c
dlls/vbscript/compile.c
+2
-0
interp.c
dlls/vbscript/interp.c
+7
-0
parse.h
dlls/vbscript/parse.h
+1
-0
parser.y
dlls/vbscript/parser.y
+14
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/compile.c
View file @
408a1bf6
...
...
@@ -390,6 +390,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_neg
);
case
EXPR_NEQUAL
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_nequal
);
case
EXPR_NEW
:
return
push_instr_str
(
ctx
,
OP_new
,
((
string_expression_t
*
)
expr
)
->
value
);
case
EXPR_NOT
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_not
);
case
EXPR_NULL
:
...
...
dlls/vbscript/interp.c
View file @
408a1bf6
...
...
@@ -444,6 +444,13 @@ static HRESULT interp_set_member(exec_ctx_t *ctx)
return
E_NOTIMPL
;
}
static
HRESULT
interp_new
(
exec_ctx_t
*
ctx
)
{
const
WCHAR
*
arg
=
ctx
->
instr
->
arg1
.
bstr
;
FIXME
(
"%s
\n
"
,
debugstr_w
(
arg
));
return
E_NOTIMPL
;
}
static
HRESULT
interp_jmp
(
exec_ctx_t
*
ctx
)
{
const
unsigned
arg
=
ctx
->
instr
->
arg1
.
uint
;
...
...
dlls/vbscript/parse.h
View file @
408a1bf6
...
...
@@ -34,6 +34,7 @@ typedef enum {
EXPR_MUL
,
EXPR_NEG
,
EXPR_NEQUAL
,
EXPR_NEW
,
EXPR_NOT
,
EXPR_NULL
,
EXPR_OR
,
...
...
dlls/vbscript/parser.y
View file @
408a1bf6
...
...
@@ -43,6 +43,7 @@ static expression_t *new_long_expression(parser_ctx_t*,expression_type_t,LONG);
static expression_t *new_double_expression(parser_ctx_t*,double);
static expression_t *new_unary_expression(parser_ctx_t*,expression_type_t,expression_t*);
static expression_t *new_binary_expression(parser_ctx_t*,expression_type_t,expression_t*,expression_t*);
static expression_t *new_new_expression(parser_ctx_t*,const WCHAR*);
static member_expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*);
...
...
@@ -256,6 +257,7 @@ ExpExpression
UnaryExpression
: LiteralExpression { $$ = $1; }
| CallExpression { $$ = $1; }
| tNEW tIdentifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; }
| '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
CallExpression
...
...
@@ -430,6 +432,18 @@ static member_expression_t *new_member_expression(parser_ctx_t *ctx, expression_
return expr;
}
static expression_t *new_new_expression(parser_ctx_t *ctx, const WCHAR *identifier)
{
string_expression_t *expr;
expr = new_expression(ctx, EXPR_NEW, sizeof(*expr));
if(!expr)
return NULL;
expr->value = identifier;
return &expr->expr;
}
static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size)
{
statement_t *stat;
...
...
dlls/vbscript/vbscript.h
View file @
408a1bf6
...
...
@@ -146,6 +146,7 @@ typedef enum {
X(mul, 1, 0, 0) \
X(neg, 1, 0, 0) \
X(nequal, 1, 0, 0) \
X(new, 1, ARG_STR, 0) \
X(not, 1, 0, 0) \
X(null, 1, 0, 0) \
X(or, 1, 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