Index: src/mirror-delay.js |
=================================================================== |
--- src/mirror-delay.js (revision 2090) |
+++ src/mirror-delay.js (working copy) |
@@ -1617,6 +1617,11 @@ |
}; |
+ScriptMirror.prototype.compilationType = function() { |
+ return this.script_.compilation_type; |
+}; |
+ |
+ |
ScriptMirror.prototype.lineCount = function() { |
return this.script_.lineCount(); |
}; |
@@ -1638,6 +1643,20 @@ |
}; |
+ScriptMirror.prototype.evalFromFunction = function() { |
+ return MakeMirror(this.script_.eval_from_function); |
+}; |
+ |
+ |
+ScriptMirror.prototype.evalFromLocation = function() { |
+ var eval_from_function = this.evalFromFunction(); |
+ if (!eval_from_function.isUndefined()) { |
+ var position = this.script_.eval_from_position; |
+ return eval_from_function.script().locationFromPosition(position, true); |
+ } |
+}; |
+ |
+ |
ScriptMirror.prototype.toText = function() { |
var result = ''; |
result += this.name(); |
@@ -1901,6 +1920,14 @@ |
} |
content.sourceLength = mirror.source().length; |
content.scriptType = mirror.scriptType(); |
+ content.compilationType = mirror.compilationType(); |
+ if (mirror.compilationType() == 1) { // Compilation type eval. |
+ content.evalFromScript = |
+ this.serializeReference(mirror.evalFromFunction().script()); |
+ var evalFromLocation = mirror.evalFromLocation() |
+ content.evalFromLocation = { line: evalFromLocation.line, |
+ column: evalFromLocation.column} |
+ } |
if (mirror.context()) { |
content.context = this.serializeReference(mirror.context()); |
} |