nestedFunctions.js 228 B

12345678910111213
  1. define(["esprima"], function (esprima) {
  2. return esprima.parse(
  3. "function foo() {\n" +
  4. " var x = 1;\n" +
  5. " function bar() {\n" +
  6. " x = 2;\n" +
  7. " }\n" +
  8. "}\n"
  9. );
  10. });