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
2fba39df
Commit
2fba39df
authored
Jul 24, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added "Expected ')'" error.
parent
29d9f099
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
+21
-12
jscript_En.rc
dlls/jscript/jscript_En.rc
+1
-0
parser.y
dlls/jscript/parser.y
+16
-12
resource.h
dlls/jscript/resource.h
+1
-0
api.js
dlls/jscript/tests/api.js
+3
-0
No files found.
dlls/jscript/jscript_En.rc
View file @
2fba39df
...
...
@@ -28,6 +28,7 @@ STRINGTABLE DISCARDABLE
IDS_ARG_NOT_OPT "Argument not optional"
IDS_SYNTAX_ERROR "Syntax error"
IDS_LBRACKET "Expected '('"
IDS_RBRACKET "Expected ')'"
IDS_NOT_FUNC "Function expected"
IDS_NOT_DATE "'[object]' is not a date object"
IDS_NOT_NUM "Number expected"
...
...
dlls/jscript/parser.y
View file @
2fba39df
...
...
@@ -267,7 +267,7 @@ SourceElements
/* ECMA-262 3rd Edition 13 */
FunctionExpression
: KFunction Identifier_opt left_bracket FormalParameterList_opt
')'
'{' FunctionBody '}'
: KFunction Identifier_opt left_bracket FormalParameterList_opt
right_bracket
'{' FunctionBody '}'
{ $$ = new_function_expression(ctx, $2, $4, $7, $1, $8-$1+1); }
KFunction
...
...
@@ -380,24 +380,24 @@ ExpressionStatement
/* ECMA-262 3rd Edition 12.5 */
IfStatement
: kIF left_bracket Expression
')'
Statement kELSE Statement
: kIF left_bracket Expression
right_bracket
Statement kELSE Statement
{ $$ = new_if_statement(ctx, $3, $5, $7); }
| kIF left_bracket Expression
')'
Statement %prec LOWER_THAN_ELSE
| kIF left_bracket Expression
right_bracket
Statement %prec LOWER_THAN_ELSE
{ $$ = new_if_statement(ctx, $3, $5, NULL); }
/* ECMA-262 3rd Edition 12.6 */
IterationStatement
: kDO Statement kWHILE left_bracket Expression
')'
semicolon_opt
: kDO Statement kWHILE left_bracket Expression
right_bracket
semicolon_opt
{ $$ = new_while_statement(ctx, TRUE, $5, $2); }
| kWHILE left_bracket Expression
')'
Statement
| kWHILE left_bracket Expression
right_bracket
Statement
{ $$ = new_while_statement(ctx, FALSE, $3, $5); }
| kFOR left_bracket ExpressionNoIn_opt ';' Expression_opt ';' Expression_opt
')'
Statement
| kFOR left_bracket ExpressionNoIn_opt ';' Expression_opt ';' Expression_opt
right_bracket
Statement
{ $$ = new_for_statement(ctx, NULL, $3, $5, $7, $9); }
| kFOR left_bracket kVAR VariableDeclarationListNoIn ';' Expression_opt ';' Expression_opt
')'
Statement
| kFOR left_bracket kVAR VariableDeclarationListNoIn ';' Expression_opt ';' Expression_opt
right_bracket
Statement
{ $$ = new_for_statement(ctx, $4, NULL, $6, $8, $10); }
| kFOR left_bracket LeftHandSideExpression kIN Expression
')'
Statement
| kFOR left_bracket LeftHandSideExpression kIN Expression
right_bracket
Statement
{ $$ = new_forin_statement(ctx, NULL, $3, $5, $7); }
| kFOR left_bracket kVAR VariableDeclarationNoIn kIN Expression
')'
Statement
| kFOR left_bracket kVAR VariableDeclarationNoIn kIN Expression
right_bracket
Statement
{ $$ = new_forin_statement(ctx, $4, NULL, $6, $8); }
/* ECMA-262 3rd Edition 12.7 */
...
...
@@ -417,7 +417,7 @@ ReturnStatement
/* ECMA-262 3rd Edition 12.10 */
WithStatement
: kWITH left_bracket Expression
')'
Statement
: kWITH left_bracket Expression
right_bracket
Statement
{ $$ = new_with_statement(ctx, $3, $5); }
/* ECMA-262 3rd Edition 12.12 */
...
...
@@ -427,7 +427,7 @@ LabelledStatement
/* ECMA-262 3rd Edition 12.11 */
SwitchStatement
: kSWITCH left_bracket Expression
')'
CaseBlock
: kSWITCH left_bracket Expression
right_bracket
CaseBlock
{ $$ = new_switch_statement(ctx, $3, $5); }
/* ECMA-262 3rd Edition 12.11 */
...
...
@@ -472,7 +472,7 @@ TryStatement
/* ECMA-262 3rd Edition 12.14 */
Catch
: kCATCH left_bracket tIdentifier
')'
Block
: kCATCH left_bracket tIdentifier
right_bracket
Block
{ $$ = new_catch_block(ctx, $3, $5); }
/* ECMA-262 3rd Edition 12.14 */
...
...
@@ -802,6 +802,10 @@ left_bracket
: '('
| error { set_error(ctx, IDS_LBRACKET); YYABORT; }
right_bracket
: ')'
| error { set_error(ctx, IDS_RBRACKET); YYABORT; }
%%
static BOOL allow_auto_semicolon(parser_ctx_t *ctx)
...
...
dlls/jscript/resource.h
View file @
2fba39df
...
...
@@ -24,6 +24,7 @@
#define IDS_ARG_NOT_OPT 0x01c1
#define IDS_SYNTAX_ERROR 0x03EA
#define IDS_LBRACKET 0x03ED
#define IDS_RBRACKET 0x03EE
#define IDS_NOT_FUNC 0x138A
#define IDS_NOT_DATE 0x138E
#define IDS_NOT_NUM 0x1389
...
...
dlls/jscript/tests/api.js
View file @
2fba39df
...
...
@@ -1325,5 +1325,8 @@ exception_test(function() {eval("while");}, "SyntaxError", -2146827283);
exception_test
(
function
()
{
eval
(
"for"
);},
"SyntaxError"
,
-
2146827283
);
exception_test
(
function
()
{
eval
(
"with"
);},
"SyntaxError"
,
-
2146827283
);
exception_test
(
function
()
{
eval
(
"switch"
);},
"SyntaxError"
,
-
2146827283
);
exception_test
(
function
()
{
eval
(
"if(false"
);},
"SyntaxError"
,
-
2146827282
);
exception_test
(
function
()
{
eval
(
"for(i=0; i<10; i++"
);},
"SyntaxError"
,
-
2146827282
);
exception_test
(
function
()
{
eval
(
"while(true"
);},
"SyntaxError"
,
-
2146827282
);
reportSuccess
();
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