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
dc73a7c4
Commit
dc73a7c4
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: Added parser support for string literals.
parent
0e415e0c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
parse.h
dlls/vbscript/parse.h
+7
-1
parser.y
dlls/vbscript/parser.y
+14
-0
No files found.
dlls/vbscript/parse.h
View file @
dc73a7c4
...
...
@@ -18,7 +18,8 @@
typedef
enum
{
EXPR_BOOL
,
EXPR_MEMBER
EXPR_MEMBER
,
EXPR_STRING
}
expression_type_t
;
typedef
struct
_expression_t
{
...
...
@@ -33,6 +34,11 @@ typedef struct {
typedef
struct
{
expression_t
expr
;
const
WCHAR
*
value
;
}
string_expression_t
;
typedef
struct
{
expression_t
expr
;
expression_t
*
obj_expr
;
const
WCHAR
*
identifier
;
expression_t
*
args
;
...
...
dlls/vbscript/parser.y
View file @
dc73a7c4
...
...
@@ -36,6 +36,7 @@ static void parse_complete(parser_ctx_t*);
static void source_add_statement(parser_ctx_t*,statement_t*);
static expression_t *new_bool_expression(parser_ctx_t*,VARIANT_BOOL);
static expression_t *new_string_expression(parser_ctx_t*,const WCHAR*);
static member_expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*);
...
...
@@ -113,6 +114,7 @@ Expression
LiteralExpression
: tTRUE { $$ = new_bool_expression(ctx, VARIANT_TRUE); CHECK_ERROR; }
| tFALSE { $$ = new_bool_expression(ctx, VARIANT_FALSE); CHECK_ERROR; }
| tString { $$ = new_string_expression(ctx, $1); CHECK_ERROR; }
%%
...
...
@@ -161,6 +163,18 @@ static expression_t *new_bool_expression(parser_ctx_t *ctx, VARIANT_BOOL value)
return &expr->expr;
}
static expression_t *new_string_expression(parser_ctx_t *ctx, const WCHAR *value)
{
string_expression_t *expr;
expr = new_expression(ctx, EXPR_STRING, sizeof(*expr));
if(!expr)
return NULL;
expr->value = value;
return &expr->expr;
}
static member_expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *obj_expr, const WCHAR *identifier)
{
member_expression_t *expr;
...
...
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