@@ -34,7 +34,7 @@ namespace Jint.Native.Function
try
{
var parser = new JavaScriptParser(code, new ParserOptions { AdaptRegexp = true, Tolerant = false });
- var program = parser.ParseProgram(true);
+ var program = parser.ParseProgram(StrictModeScope.IsStrictModeCode);
using (new StrictModeScope(program.Strict))
using (new EvalCodeScope())
@@ -86,7 +86,7 @@ namespace Jint.Native.Function
var functionExpression = "function f(" + p + ") { " + body + "}";
- var parser = new JavaScriptParser(functionExpression);
+ var parser = new JavaScriptParser(functionExpression, new ParserOptions { AdaptRegexp = true, Tolerant = false });
function = parser.ParseProgram().Body.First().As<IFunction>();
}
catch (ParserException)