From 38d57cbb2e36989d6c90d83b4d92bac470785d51 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Sun, 12 Apr 2020 17:49:13 +0100 Subject: [PATCH] cargo --doc builds, adding some docs --- boa/src/builtins/mod.rs | 8 +++++--- boa/src/environment/mod.rs | 2 ++ boa/src/exec/mod.rs | 2 ++ boa/src/lib.rs | 5 +++-- boa/src/syntax/mod.rs | 2 ++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/boa/src/builtins/mod.rs b/boa/src/builtins/mod.rs index 5e7c335c59..878381122e 100644 --- a/boa/src/builtins/mod.rs +++ b/boa/src/builtins/mod.rs @@ -1,3 +1,5 @@ +//! Builtins live here, such as Object, String, Math etc + /// Macro to create a new member function of a prototype /// If no length is provided, the length will be set to 0. macro_rules! make_builtin_fn { @@ -13,9 +15,7 @@ macro_rules! make_builtin_fn { /// The global `Array` object pub mod array; -/// the global `Symbol` Object -pub mod symbol; -// The global `Boolean` object +/// The global `Boolean` object pub mod boolean; pub mod console; /// The global `Error` object @@ -36,5 +36,7 @@ pub mod property; pub mod regexp; /// The global `String` object pub mod string; +/// the global `Symbol` Object +pub mod symbol; /// Javascript values, utility methods and conversion between Javascript values and Rust values pub mod value; diff --git a/boa/src/environment/mod.rs b/boa/src/environment/mod.rs index f9b3b30122..3e4d89bbeb 100644 --- a/boa/src/environment/mod.rs +++ b/boa/src/environment/mod.rs @@ -1,3 +1,5 @@ +//! Environment handling, lexical, object, function and declaritive records + pub mod declarative_environment_record; pub mod environment_record_trait; pub mod function_environment_record; diff --git a/boa/src/exec/mod.rs b/boa/src/exec/mod.rs index aaf4b16496..9ee6d8b317 100644 --- a/boa/src/exec/mod.rs +++ b/boa/src/exec/mod.rs @@ -1,3 +1,5 @@ +//! Execution of the AST, this is where the interpreter actually runs + #[cfg(test)] mod tests; diff --git a/boa/src/lib.rs b/boa/src/lib.rs index b90598e216..ccd89d4254 100644 --- a/boa/src/lib.rs +++ b/boa/src/lib.rs @@ -12,7 +12,7 @@ unused_lifetimes, unreachable_pub, trivial_numeric_casts, - rustdoc, + // rustdoc, missing_debug_implementations, missing_copy_implementations, deprecated_in_future, @@ -29,7 +29,8 @@ clippy::cognitive_complexity, clippy::must_use_candidate, clippy::missing_errors_doc, - clippy::as_conversions + clippy::as_conversions, + missing_doc_code_examples )] pub mod builtins; diff --git a/boa/src/syntax/mod.rs b/boa/src/syntax/mod.rs index fe1eab7a5b..ab4b4a62d8 100644 --- a/boa/src/syntax/mod.rs +++ b/boa/src/syntax/mod.rs @@ -1,3 +1,5 @@ +//! Syntactical analysis, such as AST, Parsing and Lexing + /// The Javascript Abstract Syntax Tree pub mod ast; /// Lexical analysis (tokenizing/lexing).