|
@@ -3493,15 +3493,17 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- e.data.errors.forEach(function (error) {
|
|
|
|
|
- if (error.expected.length > 0) {
|
|
|
|
|
- var token = editor.session.getTokenAt(error.loc.first_line - 1, error.loc.first_column);
|
|
|
|
|
- if (token) {
|
|
|
|
|
- token.error = error;
|
|
|
|
|
- editor.session.addMarker(new AceRange(error.loc.first_line - 1, error.loc.first_column, error.loc.last_line - 1, error.loc.last_column), 'hue-ace-error', 'fail');
|
|
|
|
|
|
|
+ if (e.data.errors) {
|
|
|
|
|
+ e.data.errors.forEach(function (error) {
|
|
|
|
|
+ if (error.expected.length > 0) {
|
|
|
|
|
+ var token = editor.session.getTokenAt(error.loc.first_line - 1, error.loc.first_column);
|
|
|
|
|
+ if (token) {
|
|
|
|
|
+ token.error = error;
|
|
|
|
|
+ editor.session.addMarker(new AceRange(error.loc.first_line - 1, error.loc.first_column, error.loc.last_line - 1, error.loc.last_column), 'hue-ace-error', 'fail');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var lastKnownLocations = { id: $el.attr("id"), type: snippet.type(), defaultDatabase: snippet.database(), locations: e.data.locations };
|
|
var lastKnownLocations = { id: $el.attr("id"), type: snippet.type(), defaultDatabase: snippet.database(), locations: e.data.locations };
|