

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 不支持的语句
<a name="ecma-unsupported"></a>

Amazon Lex V2 不支持以下 ECMAScript功能。

**Topics**
+ [空语句](#ecma-unsupported-empty)
+ [Continue 语句](#ecma-unsupported-continue)
+ [Break 语句](#ecma-unsupported-break)
+ [Return 语句](#ecma-unsupported-return)
+ [Throw 语句](#ecma-unsupported-throw)
+ [Try 语句](#ecma-unsupported-try)
+ [Debugger 语句](#ecma-unsupported-debugger)
+ [带标签的语句](#ecma-unsupported-labelled)
+ [Class 声明](#ecma-unsupported-class)

## 空语句
<a name="ecma-unsupported-empty"></a>

空语句用于不提供任何语句。以下是空语句的句法：

```
;
```

## Continue 语句
<a name="ecma-unsupported-continue"></a>

支持将不带标签的 continue 语句与[迭代语句](ecma-iteration.md)配合使用。不支持带标签的 continue 语句。

```
// continue with label
// this allows the program to jump to a
// labelled statement (see labelled statement below)
continue <label>;
```

## Break 语句
<a name="ecma-unsupported-break"></a>

支持将不带标签的 break 语句与[迭代语句](ecma-iteration.md)配合使用。不支持带标签的 break 语句。

```
// break with label
// this allows the program to break out of a
// labelled statement (see labelled statement below)
break <label>;
```

## Return 语句
<a name="ecma-unsupported-return"></a>

```
return expression;
```

## Throw 语句
<a name="ecma-unsupported-throw"></a>

Throw 语句用于引发用户定义的异常。

```
throw expression;
```

## Try 语句
<a name="ecma-unsupported-try"></a>

```
try {
  statements
}
catch (expression) {
  statements
}
finally {
  statements
}
```

## Debugger 语句
<a name="ecma-unsupported-debugger"></a>

Debugger 语句用于调用环境提供的调试功能。

```
debugger;
```

## 带标签的语句
<a name="ecma-unsupported-labelled"></a>

带标签的语句可以与 `break` 或 `continue` 语句配合使用。

```
label:
   statements


// Example
let str = '';

loop1:
for (let i = 0; i < 5; i++) {
  if (i === 1) {
    continue loop1;
  }
  str = str + i;
}

console.log(str);
```

## Class 声明
<a name="ecma-unsupported-class"></a>

```
class Rectangle {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }
}
```