语法

  1. 简单语句(前三个是 normal 语句)
    1. 表达式语句
    2. 空语句
    3. 调试语句
    4. throw语句
    5. continue语句
    6. break语句
    7. return语句
  2. 复合语句
    1. block语句 - 是单条语句变成多条语句,非normal就中断
    2. iteration
      1. while()
      2. do whild()
      3. fori
      4. forin
      5. forof : 放在有Iteration的对象上
        1. 不能直接 for of Object
        2. 一般for of Generator/Array ```javascript // generator function *g(){ yield 0; yield 1; yield 4; }

for(let p of g()){ console.log(p) } ```

  1. 申明

    1. FunctionStatement
    2. FunctionStatement
    3. FunctionStatement
    4. FunctionStatement
    5. FunctionStatement

      运行时

  2. 完成记录(completion record):语句完成的结果

    1. normal break continue return throw
  3. lexical environment