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
ec25138a
Commit
ec25138a
authored
Aug 05, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added 'unterminated string' error.
parent
5ee34ea8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
6 deletions
+10
-6
engine.h
dlls/jscript/engine.h
+1
-0
jscript_En.rc
dlls/jscript/jscript_En.rc
+1
-0
lex.c
dlls/jscript/lex.c
+4
-5
parser.y
dlls/jscript/parser.y
+2
-1
resource.h
dlls/jscript/resource.h
+1
-0
api.js
dlls/jscript/tests/api.js
+1
-0
No files found.
dlls/jscript/engine.h
View file @
ec25138a
...
...
@@ -56,6 +56,7 @@ typedef struct _parser_ctx_t {
source_elements_t
*
source
;
BOOL
nl
;
BOOL
is_html
;
BOOL
lexer_error
;
HRESULT
hres
;
jsheap_t
heap
;
...
...
dlls/jscript/jscript_En.rc
View file @
ec25138a
...
...
@@ -30,6 +30,7 @@ STRINGTABLE DISCARDABLE
IDS_SEMICOLON "Expected ';'"
IDS_LBRACKET "Expected '('"
IDS_RBRACKET "Expected ')'"
IDS_UNTERMINATED_STR "Unterminated string constant"
IDS_NOT_FUNC "Function expected"
IDS_NOT_DATE "'[object]' is not a date object"
IDS_NOT_NUM "Number expected"
...
...
dlls/jscript/lex.c
View file @
ec25138a
...
...
@@ -100,7 +100,8 @@ static const struct {
static
int
lex_error
(
parser_ctx_t
*
ctx
,
HRESULT
hres
)
{
ctx
->
hres
=
hres
;
ctx
->
hres
=
JSCRIPT_ERROR
|
hres
;
ctx
->
lexer_error
=
TRUE
;
return
-
1
;
}
...
...
@@ -342,10 +343,8 @@ static int parse_string_literal(parser_ctx_t *ctx, const WCHAR **ret, WCHAR endc
ctx
->
ptr
++
;
}
if
(
ctx
->
ptr
==
ctx
->
end
)
{
WARN
(
"unexpected end of file
\n
"
);
return
lex_error
(
ctx
,
E_FAIL
);
}
if
(
ctx
->
ptr
==
ctx
->
end
)
return
lex_error
(
ctx
,
IDS_UNTERMINATED_STR
);
len
=
ctx
->
ptr
-
ptr
;
...
...
dlls/jscript/parser.y
View file @
ec25138a
...
...
@@ -1577,7 +1577,8 @@ static void program_parsed(parser_ctx_t *ctx, source_elements_t *source)
pop_func(ctx);
ctx->source = source;
ctx->hres = S_OK;
if(!ctx->lexer_error)
ctx->hres = S_OK;
}
void parser_release(parser_ctx_t *ctx)
...
...
dlls/jscript/resource.h
View file @
ec25138a
...
...
@@ -26,6 +26,7 @@
#define IDS_SEMICOLON 0x03EC
#define IDS_LBRACKET 0x03ED
#define IDS_RBRACKET 0x03EE
#define IDS_UNTERMINATED_STR 0x03F7
#define IDS_NOT_FUNC 0x138A
#define IDS_NOT_DATE 0x138E
#define IDS_NOT_NUM 0x1389
...
...
dlls/jscript/tests/api.js
View file @
ec25138a
...
...
@@ -1333,5 +1333,6 @@ exception_test(function() {eval("for(i=0")}, "SyntaxError", -2146827284);
exception_test
(
function
()
{
eval
(
"for(i=0;i<10"
)},
"SyntaxError"
,
-
2146827284
);
exception_test
(
function
()
{
eval
(
"while("
)},
"SyntaxError"
,
-
2146827286
);
exception_test
(
function
()
{
eval
(
"if("
)},
"SyntaxError"
,
-
2146827286
);
exception_test
(
function
()
{
eval
(
"'unterminated"
)},
"SyntaxError"
,
-
2146827273
);
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