Browse Source

fixed doc test

pull/293/head
HalidOdat 5 years ago
parent
commit
7b2c722d1b
  1. 10
      boa/src/syntax/ast/keyword.rs

10
boa/src/syntax/ast/keyword.rs

@ -1,3 +1,5 @@
//! This module implements the `Keyword` structure, which represents reserved words of The JavaScript language.
use std::{ use std::{
error, error,
fmt::{Display, Error, Formatter}, fmt::{Display, Error, Formatter},
@ -210,7 +212,7 @@ pub enum Keyword {
/// until the test condition evaluates to `false`. /// until the test condition evaluates to `false`.
/// ///
/// Syntax: /// Syntax:
/// ```javascript /// ```text
/// do /// do
/// statement /// statement
/// while (condition); /// while (condition);
@ -342,7 +344,7 @@ pub enum Keyword {
/// The **`function` declaration** (function statement) defines a function with the specified parameters. /// The **`function` declaration** (function statement) defines a function with the specified parameters.
/// ///
/// Syntax: /// Syntax:
/// ``` /// ```text
/// function name([param[, param,[..., param]]]) { /// function name([param[, param,[..., param]]]) {
/// [statements] /// [statements]
/// } /// }
@ -373,7 +375,7 @@ pub enum Keyword {
/// The **`if` statement** executes a statement if a specified condition is [`truthy`][truthy]. If the condition is [`falsy`][falsy], another statement can be executed. /// The **`if` statement** executes a statement if a specified condition is [`truthy`][truthy]. If the condition is [`falsy`][falsy], another statement can be executed.
/// ///
/// Syntax: /// Syntax:
/// ``` /// ```text
/// if (condition) /// if (condition)
/// statement1 /// statement1
/// [else /// [else
@ -449,7 +451,7 @@ pub enum Keyword {
/// The static **`import` statement** is used to import bindings which are exported by another module. /// The static **`import` statement** is used to import bindings which are exported by another module.
/// ///
/// Syntax: /// Syntax:
/// ``` /// ```text
/// import defaultExport from "module-name"; /// import defaultExport from "module-name";
/// import * as name from "module-name"; /// import * as name from "module-name";
/// import { export1 } from "module-name"; /// import { export1 } from "module-name";

Loading…
Cancel
Save