Fix several issues in parse of variable declarations.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-06-29 00:51:36 +03:00
committed by Evgeny Gavrin
parent 9e3f123cd5
commit 6573ffd632
2 changed files with 123 additions and 84 deletions
+30 -1
View File
@@ -12,8 +12,37 @@
// See the License for the specific language governing permissions and
// limitations under the License.
assert (x === undefined);
assert (y === undefined);
assert (z === undefined);
assert (i === undefined);
assert (j === undefined);
assert (q === undefined);
eval ('var n');
eval ('var m = 1');
try
{
x = p;
assert (false);
}
catch (e)
{
assert (e instanceof ReferenceError);
}
{
var y;
}
var x = y;
assert (x === undefined);
do var z while (0);
for (var i, j = function () {var p;}; i === undefined; i = null)
{
}
for (var q in {})
{
}