Index: src/rewriter.cc |
diff --git a/src/rewriter.cc b/src/rewriter.cc |
index ee08d885f602f2d110e60a540cf7a0e4281ce241..bcfb814d44d8475e9d4b55f7012b59fba20f6a1b 100644 |
--- a/src/rewriter.cc |
+++ b/src/rewriter.cc |
@@ -235,6 +235,9 @@ bool Rewriter::Rewrite(ParseInfo* info) { |
// eval('with ({x:1}) x = 1'); |
// the end position of the function generated for executing the eval code |
// coincides with the end of the with scope which is the position of '1'. |
+ // Note that this may mean the position is outside the source code |
+ // completely if there is no terminal newline, curly brace, or semicolon, |
+ // often the case for 'eval'. |
int pos = function->end_position(); |
VariableProxy* result_proxy = |
processor.factory()->NewVariableProxy(result, pos); |