Skip to content

14 Program

Syntax

Program :
SourceElements
SourceElements :
SourceElement
SourceElements SourceElement
SourceElement :
Statement FunctionDeclaration
  1. Process SourceElements for function declarations.
  2. Evaluate SourceElements .
  3. Return Result(2).

The production SourceElements : SourceElement is processed for function declarations as follows:

1. Process SourceElement for function declarations.

The production SourceElements : SourceElements SourceElement is processed for function declarations as follows:

  1. Process SourceElements for function declarations.
  2. Process SourceElement for function declarations.
  1. Evaluate SourceElements .
  2. Evaluate SourceElement .
  3. If Result(2) is a value completion, return Result(2).
  4. Return Result(1).

The production SourceElement : Statement is processed for function declarations by taking no action.

The production SourceElement : FunctionDeclaration is processed for function declarations as follows:

1. Process FunctionDeclaration for function declarations.

1. Return "normal completion".