Permalink
Browse files

adjusted parse error display to Carakan

  • Loading branch information...
1 parent e94eeaa commit b2cc9857029330776b240801039b98f19bd07dba @chriskr chriskr committed Apr 14, 2010
Showing with 4 additions and 9 deletions.
  1. +2 −3 src/ecma-debugger/formatter.js
  2. +1 −1 src/ecma-debugger/js-source-view.js
  3. +1 −5 src/ecma-debugger/runtimes.js
@@ -592,7 +592,7 @@ window.cls.SimpleJSParser = function()
{
__parse_error_line_buffer += __buffer;
- if(__parse_error_line_offset > __parse_error_line_buffer.length)
+ if(__parse_error_line_offset >= __parse_error_line_buffer.length)
{
read_buffer_default();
@@ -737,8 +737,7 @@ window.cls.SimpleJSParser = function()
__parse_error_line_offset = script.parse_error.error_line_offset;
__parse_error_line_buffer ='';
__parse_error_first_token = true;
- __parse_error_description =
- script.parse_error.reason + '\n' + script.parse_error.expected_token;
+ __parse_error_description = script.parse_error.description;
}
else
{
@@ -524,7 +524,7 @@ cls.JsSourceView = function(id, name, container_class)
}
if(script.parse_error)
{
- views.js_source.showLinePointer(script.parse_error.error_line, true )
+ views.js_source.showLinePointer(script.parse_error.error_line + 1, true )
}
}
__current_line = line_nr;
@@ -644,18 +644,14 @@ cls.EcmascriptDebugger["5.0"].Runtimes = function()
if(__scripts[message[SCRIPT_ID]])
{
- var reason = /^[^:]*/.exec(message[DESCRIPTION]);
- var expected_token = /Expected token: '[^']*'/i.exec(message[DESCRIPTION]);
var error = __scripts[message[SCRIPT_ID]].parse_error =
{
runtime_id: message[RUNTIME_ID],
script_id: message[SCRIPT_ID],
line_nr: message[LINE_NUMBER],
offset: message[OFFSET],
context: message[CONTEXT],
- description: message[DESCRIPTION],
- reason: reason && reason[0] || '',
- expected_token: expected_token && expected_token[0] || ''
+ description: message[DESCRIPTION]
};
if(settings['js_source'].get('error'))
{

0 comments on commit b2cc985

Please sign in to comment.