code: function parseFunctionSourceElements() {
          var sourceElement, sourceElements = [], token, directive, firstRestricted, oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody;
  
          expect('{');
  
          while (index < length) {
              token = lookahead();
              if (token.type !== Token.StringLiteral) {
                  break;
              }
  
              sourceElement = parseSourceElement();
              sourceElements.push(sourceElement);
              if (sourceElement.expression.type !== Syntax.Literal) {
                  // this is not directive
                  break;
              }
              directive = sliceSource(token.range[0] + 1, token.range[1] - 1);
              if (directive === 'use strict') {
                  strict = true;
                  if (firstRestricted) {
                      throwError(firstRestricted, Messages.StrictOctalLiteral);
                  }
              } else {
                  if (!firstRestricted && token.octal) {
                      firstRestricted = token;
                  }
              }
          }
  
          oldLabelSet = labelSet;
          oldInIteration = inIteration;
          oldInSwitch = inSwitch;
          oldInFunctionBody = inFunctionBody;
  
          labelSet = {};
          inIteration = false;
          inSwitch = false;
          inFunctionBody = true;
  
          while (index < length) {
              if (match('}')) {
                  break;
              }
              sourceElement = parseSourceElement();
              if (typeof sourceElement === 'undefined') {
                  break;
              }
              sourceElements.push(sourceElement);
          }
  
          expect('}');
  
          labelSet = oldLabelSet;
          inIteration = oldInIteration;
          inSwitch = oldInSwitch;
          inFunctionBody = oldInFunctionBody;
  
          return {
              type: Syntax.BlockStatement,
              body: wrapBlock(sourceElements)
          };
      }
docs: 13 Function Definition