Browse Source

Missing docs

pull/836/head
Paul Lancaster 4 years ago
parent
commit
7e4f3d1c86
  1. 7
      boa/src/syntax/ast/node/await_expr/mod.rs
  2. 4
      boa/src/syntax/ast/node/declaration/async_function_decl/mod.rs
  3. 5
      boa/src/syntax/ast/node/declaration/async_function_expr/mod.rs
  4. 10
      boa/src/syntax/parser/expression/await_expr.rs

7
boa/src/syntax/ast/node/await_expr/mod.rs

@ -8,14 +8,15 @@ use std::fmt;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
///
/// An await expression is used within an async function to pause execution and wait for a
/// promise to resolve.
///
/// More information:
/// - [ECMAScript reference][spec]
/// - [MDN documentation][mdn]
///
/// [spec]:
/// [mdn]:
/// [spec]: https://tc39.es/ecma262/#prod-AwaitExpression
/// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, Trace, Finalize, PartialEq)]
pub struct AwaitExpr {

4
boa/src/syntax/ast/node/declaration/async_function_decl/mod.rs

@ -1,3 +1,5 @@
//! Async Function Declaration.
use crate::{
exec::Executable,
syntax::ast::node::{join_nodes, FormalParameter, Node, StatementList},
@ -9,7 +11,7 @@ use std::fmt;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
/// Async Function Declaration.
/// An async function is used to specify an action (or series of actions) to perform asynchronously.
///
/// More information:
/// - [ECMAScript reference][spec]

5
boa/src/syntax/ast/node/declaration/async_function_expr/mod.rs

@ -1,3 +1,5 @@
//! Async Function Expression.
use crate::{
exec::Executable,
syntax::ast::node::{join_nodes, FormalParameter, Node, StatementList},
@ -9,7 +11,8 @@ use std::fmt;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
/// AsyncFunctionExpr.
/// An async function expression is very similar to an async function declaration except used within
/// a wider expression (for example during an assignment).
///
/// More information:
/// - [ECMAScript reference][spec]

10
boa/src/syntax/parser/expression/await_expr.rs

@ -4,8 +4,8 @@
//! - [MDN documentation][mdn]
//! - [ECMAScript specification][spec]
//!
//! [mdn]:
//! [spec]:
//! [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await
//! [spec]: https://tc39.es/ecma262/#prod-AwaitExpression
use super::unary::UnaryExpression;
@ -16,14 +16,14 @@ use crate::syntax::{
};
use std::io::Read;
/// Parses a await expression.
/// Parses an await expression.
///
/// More information:
/// - [MDN documentation][mdn]
/// - [ECMAScript specification][spec]
///
/// [mdn]:
/// [spec]:
/// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await
/// [spec]: https://tc39.es/ecma262/#prod-AwaitExpression
#[derive(Debug, Clone, Copy)]
pub(in crate::syntax::parser) struct AwaitExpression {
allow_yield: AllowYield,

Loading…
Cancel
Save