diff --git a/boa_ast/src/declaration/mod.rs b/boa_ast/src/declaration/mod.rs index fa89cca1f58..2aceb7864b2 100644 --- a/boa_ast/src/declaration/mod.rs +++ b/boa_ast/src/declaration/mod.rs @@ -1,6 +1,6 @@ //! The [`Declaration`] Parse Node, as defined by the [spec]. //! -//! Javascript declarations include: +//! ECMAScript declarations include: //! - [Lexical][lex] declarations (`let`, `const`). //! - [Function][fun] declarations (`function`, `async function`). //! - [Class][class] declarations. diff --git a/boa_ast/src/declaration/variable.rs b/boa_ast/src/declaration/variable.rs index e3012a7e270..c206ef49b72 100644 --- a/boa_ast/src/declaration/variable.rs +++ b/boa_ast/src/declaration/variable.rs @@ -19,7 +19,7 @@ use super::Declaration; /// /// The scope of a variable declared with `var` is its current execution context, which is either /// the enclosing function or, for variables declared outside any function, global. If you -/// re-declare a JavaScript variable, it will not lose its value. +/// re-declare a ECMAScript variable, it will not lose its value. /// /// Although a bit confusing, `VarDeclaration`s are not considered [`Declaration`]s by the spec. /// This is partly because it has very different semantics from `let` and `const` declarations, but diff --git a/boa_ast/src/expression/identifier.rs b/boa_ast/src/expression/identifier.rs index 0f7f73a05b7..cdcf2758760 100644 --- a/boa_ast/src/expression/identifier.rs +++ b/boa_ast/src/expression/identifier.rs @@ -25,7 +25,7 @@ pub const RESERVED_IDENTIFIERS_STRICT: [Sym; 9] = [ /// An `identifier` is a sequence of characters in the code that identifies a variable, /// function, or property. /// -/// In JavaScript, identifiers are case-sensitive and can contain Unicode letters, $, _, and +/// In ECMAScript, identifiers are case-sensitive and can contain Unicode letters, $, _, and /// digits (0-9), but may not start with a digit. /// /// An identifier differs from a string in that a string is data, while an identifier is part diff --git a/boa_ast/src/expression/literal/mod.rs b/boa_ast/src/expression/literal/mod.rs index beed8d8f900..d609fc78098 100644 --- a/boa_ast/src/expression/literal/mod.rs +++ b/boa_ast/src/expression/literal/mod.rs @@ -1,4 +1,4 @@ -//! This module contains all literal expressions, which represents the primitive values in JavaScript. +//! This module contains all literal expressions, which represents the primitive values in ECMAScript. //! //! More information: //! - [ECMAScript reference][spec] @@ -22,7 +22,7 @@ use num_bigint::BigInt; use super::Expression; -/// Literals represent values in JavaScript. +/// Literals represent values in ECMAScript. /// /// These are fixed values **not variables** that you literally provide in your script. /// @@ -40,7 +40,7 @@ pub enum Literal { /// /// A string must be delimited by quotation marks of the same type (that is, either both single quotation marks, or both double quotation marks). /// You can call any of the String object's methods on a string literal value. - /// JavaScript automatically converts the string literal to a temporary String object, + /// ECMAScript automatically converts the string literal to a temporary String object, /// calls the method, then discards the temporary String object. /// /// More information: @@ -74,7 +74,7 @@ pub enum Literal { /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Numeric_literals Int(i32), - /// BigInt provides a way to represent whole numbers larger than the largest number JavaScript + /// BigInt provides a way to represent whole numbers larger than the largest number ECMAScript /// can reliably represent with the `Number` primitive. /// /// More information: diff --git a/boa_ast/src/expression/literal/object.rs b/boa_ast/src/expression/literal/object.rs index 2d2b91c39f8..61f023418e2 100644 --- a/boa_ast/src/expression/literal/object.rs +++ b/boa_ast/src/expression/literal/object.rs @@ -13,7 +13,7 @@ use crate::{ use boa_interner::{Interner, Sym, ToIndentedString, ToInternedString}; use core::ops::ControlFlow; -/// Objects in JavaScript may be defined as an unordered collection of related data, of +/// Objects in ECMAScript may be defined as an unordered collection of related data, of /// primitive or reference types, in the form of “key: value” pairs. /// /// Objects can be initialized using `new Object()`, `Object.create()`, or using the literal diff --git a/boa_ast/src/expression/mod.rs b/boa_ast/src/expression/mod.rs index e5a0a295f2b..23087ba7629 100644 --- a/boa_ast/src/expression/mod.rs +++ b/boa_ast/src/expression/mod.rs @@ -1,6 +1,6 @@ //! The [`Expression`] Parse Node, as defined by the [spec]. //! -//! Javascript expressions include: +//! ECMAScript expressions include: //! - [Primary][primary] expressions (`this`, function expressions, literals). //! - [Left hand side][lhs] expressions (accessors, `new` operator, `super`). //! - [operator] expressions. @@ -54,7 +54,7 @@ pub mod operator; #[cfg_attr(feature = "fuzz", derive(arbitrary::Arbitrary))] #[derive(Debug, Clone, PartialEq)] pub enum Expression { - /// The JavaScript `this` keyword refers to the object it belongs to. + /// The ECMAScript `this` keyword refers to the object it belongs to. /// /// A property of an execution context (global, function or eval) that, /// in non–strict mode, is always a reference to an object and in strict diff --git a/boa_ast/src/expression/operator/conditional.rs b/boa_ast/src/expression/operator/conditional.rs index f18b8d8f6a1..8ecca552bf0 100644 --- a/boa_ast/src/expression/operator/conditional.rs +++ b/boa_ast/src/expression/operator/conditional.rs @@ -6,7 +6,7 @@ use crate::{ use boa_interner::{Interner, ToInternedString}; use core::ops::ControlFlow; -/// The `conditional` (ternary) operation is the only JavaScript operation that takes three +/// The `conditional` (ternary) operation is the only ECMAScript operation that takes three /// operands. /// /// This operation takes three operands: a condition followed by a question mark (`?`), diff --git a/boa_ast/src/keyword.rs b/boa_ast/src/keyword.rs index a90ac7f73be..6b48cd3d2fc 100644 --- a/boa_ast/src/keyword.rs +++ b/boa_ast/src/keyword.rs @@ -1,7 +1,7 @@ -//! The `Keyword` AST node, which represents reserved words of the JavaScript language. +//! The `Keyword` AST node, which represents reserved words of the ECMAScript language. //! //! The [specification][spec] defines keywords as tokens that match an `IdentifierName`, but also -//! have special meaning in JavaScript. In JavaScript you cannot use these reserved words as variables, +//! have special meaning in ECMAScript. In ECMAScript, you cannot use these reserved words as variables, //! labels, or function names. //! //! The [MDN documentation][mdn] contains a more extensive explanation about keywords. diff --git a/boa_ast/src/position.rs b/boa_ast/src/position.rs index 5c7a0956b4b..36cd6213588 100644 --- a/boa_ast/src/position.rs +++ b/boa_ast/src/position.rs @@ -1,6 +1,6 @@ use std::{cmp::Ordering, fmt, num::NonZeroU32}; -/// A position in the JavaScript source code. +/// A position in the ECMAScript source code. /// /// Stores both the column number and the line number. /// @@ -48,7 +48,7 @@ impl fmt::Display for Position { } } -/// A span in the JavaScript source code. +/// A span in the ECMAScript source code. /// /// Stores a start position and an end position. /// diff --git a/boa_ast/src/punctuator.rs b/boa_ast/src/punctuator.rs index 3ab065dc6b8..9bda165b0d3 100644 --- a/boa_ast/src/punctuator.rs +++ b/boa_ast/src/punctuator.rs @@ -1,4 +1,4 @@ -//! The `Punctuator` enum, which contains all punctuators used in JavaScript. +//! The `Punctuator` enum, which contains all punctuators used in ECMAScript. //! //! More information: //! - [ECMAScript Reference][spec] @@ -14,7 +14,7 @@ use std::{ fmt::{Display, Error, Formatter}, }; -/// All of the punctuators used in JavaScript. +/// All of the punctuators used in ECMAScript. /// /// More information: /// - [ECMAScript Reference][spec] diff --git a/boa_ast/src/statement/block.rs b/boa_ast/src/statement/block.rs index ca7f4ff548c..beeea6fb3cf 100644 --- a/boa_ast/src/statement/block.rs +++ b/boa_ast/src/statement/block.rs @@ -11,8 +11,8 @@ use core::ops::ControlFlow; /// more statements. /// /// The block statement is often called compound statement in other languages. -/// It allows you to use multiple statements where JavaScript expects only one statement. -/// Combining statements into blocks is a common practice in JavaScript. The opposite behavior +/// It allows you to use multiple statements where ECMAScript expects only one statement. +/// Combining statements into blocks is a common practice in ECMAScript. The opposite behavior /// is possible using an empty statement, where you provide no statement, although one is /// required. /// diff --git a/boa_ast/src/statement/mod.rs b/boa_ast/src/statement/mod.rs index bbd610b190a..14fa656442b 100644 --- a/boa_ast/src/statement/mod.rs +++ b/boa_ast/src/statement/mod.rs @@ -1,6 +1,6 @@ //! The [`Statement`] Parse Node, as defined by the [spec]. //! -//! Javascript [statements] are mainly composed of control flow operations, such as [`If`], +//! ECMAScript [statements] are mainly composed of control flow operations, such as [`If`], //! [`WhileLoop`], and [`Break`]. However, it also contains statements such as [`VarDeclaration`], //! [`Block`] or [`Expression`] which are not strictly used for control flow. //! diff --git a/boa_ast/src/visitor.rs b/boa_ast/src/visitor.rs index 5cf62e2b5c6..3a1c055a7f5 100644 --- a/boa_ast/src/visitor.rs +++ b/boa_ast/src/visitor.rs @@ -1,4 +1,4 @@ -//! Javascript Abstract Syntax Tree visitors. +//! ECMAScript Abstract Syntax Tree visitors. //! //! This module contains visitors which can be used to inspect or modify AST nodes. This allows for //! fine-grained manipulation of ASTs for analysis, rewriting, or instrumentation. diff --git a/boa_parser/src/lexer/comment.rs b/boa_parser/src/lexer/comment.rs index b5db8a5b32b..abd9633855d 100644 --- a/boa_parser/src/lexer/comment.rs +++ b/boa_parser/src/lexer/comment.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for comments used in the JavaScript programing language. +//! Boa's lexing for ECMAScript comments. use crate::lexer::{Cursor, Error, Token, TokenKind, Tokenizer}; use boa_ast::{Position, Span}; diff --git a/boa_parser/src/lexer/cursor.rs b/boa_parser/src/lexer/cursor.rs index 5dd890f8388..88a095c5290 100644 --- a/boa_parser/src/lexer/cursor.rs +++ b/boa_parser/src/lexer/cursor.rs @@ -1,4 +1,4 @@ -//! Module implementing the lexer cursor. This is used for managing the input byte stream. +//! Boa's lexer cursor that manages the input byte stream. use boa_ast::Position; use boa_profiler::Profiler; use std::io::{self, Bytes, Error, ErrorKind, Read}; diff --git a/boa_parser/src/lexer/identifier.rs b/boa_parser/src/lexer/identifier.rs index d66038d3061..288cef2d16f 100644 --- a/boa_parser/src/lexer/identifier.rs +++ b/boa_parser/src/lexer/identifier.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for identifiers (foo, myvar, etc.) used in the JavaScript programing language. +//! This module implements lexing for identifiers (foo, myvar, etc.) used in ECMAScript. use crate::lexer::{Cursor, Error, StringLiteral, Token, TokenKind, Tokenizer}; use boa_ast::{Keyword, Position, Span}; diff --git a/boa_parser/src/lexer/mod.rs b/boa_parser/src/lexer/mod.rs index 7c2c17adae0..3d878af86cb 100644 --- a/boa_parser/src/lexer/mod.rs +++ b/boa_parser/src/lexer/mod.rs @@ -1,6 +1,4 @@ -//! A lexical analyzer for JavaScript source code. -//! -//! This module contains the Boa lexer or tokenizer implementation. +//! Boa's lexical analyzer(Lexer) for ECMAScript source code. //! //! The Lexer splits its input source code into a sequence of input elements called tokens, //! represented by the [Token] structure. It also removes diff --git a/boa_parser/src/lexer/number.rs b/boa_parser/src/lexer/number.rs index 82127aeb022..585b69a7518 100644 --- a/boa_parser/src/lexer/number.rs +++ b/boa_parser/src/lexer/number.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for number literals (123, 787) used in the JavaScript programing language. +//! This module implements lexing for number literals (123, 787) used in ECMAScript. use crate::lexer::{token::Numeric, Cursor, Error, Token, TokenKind, Tokenizer}; use boa_ast::{Position, Span}; diff --git a/boa_parser/src/lexer/operator.rs b/boa_parser/src/lexer/operator.rs index acfb686c4b5..821781faecf 100644 --- a/boa_parser/src/lexer/operator.rs +++ b/boa_parser/src/lexer/operator.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for operators (+, - etc.) used in the JavaScript programing language. +//! Boa's lexing for ECMAScript operators (+, - etc.). use crate::lexer::{Cursor, Error, Token, TokenKind, Tokenizer}; use boa_ast::{Position, Punctuator, Span}; diff --git a/boa_parser/src/lexer/private_identifier.rs b/boa_parser/src/lexer/private_identifier.rs index 0d1bd852489..296fe13c1d8 100644 --- a/boa_parser/src/lexer/private_identifier.rs +++ b/boa_parser/src/lexer/private_identifier.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for private identifiers (#foo, #myvar, etc.) used in the JavaScript programing language. +//! Boa's lexing for ECMAScript private identifiers (#foo, #myvar, etc.). use crate::lexer::{identifier::Identifier, Cursor, Error, Token, TokenKind, Tokenizer}; use boa_ast::{Position, Span}; diff --git a/boa_parser/src/lexer/regex.rs b/boa_parser/src/lexer/regex.rs index 6b2a9f39ccb..41d6270dc46 100644 --- a/boa_parser/src/lexer/regex.rs +++ b/boa_parser/src/lexer/regex.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for regex literals used in the JavaScript programing language. +//! Boa's lexing for ECMAScript regex literals. use crate::lexer::{Cursor, Error, Span, Token, TokenKind, Tokenizer}; use bitflags::bitflags; diff --git a/boa_parser/src/lexer/spread.rs b/boa_parser/src/lexer/spread.rs index b26b8f5d47b..d22a1f41cb5 100644 --- a/boa_parser/src/lexer/spread.rs +++ b/boa_parser/src/lexer/spread.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for spread (...) literals used in the JavaScript programing language. +//! Boa's lexing for ECMAScript spread (...) literals. use crate::lexer::{Cursor, Error, Token, Tokenizer}; use boa_ast::{Position, Punctuator, Span}; diff --git a/boa_parser/src/lexer/string.rs b/boa_parser/src/lexer/string.rs index 38f44ef2d8c..ed337e1b33c 100644 --- a/boa_parser/src/lexer/string.rs +++ b/boa_parser/src/lexer/string.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for string literals used in the JavaScript programing language. +//! Boa's lexing for ECMAScript string literals. use crate::lexer::{Cursor, Error, Token, TokenKind, Tokenizer}; use boa_ast::{Position, Span}; diff --git a/boa_parser/src/lexer/template.rs b/boa_parser/src/lexer/template.rs index b1ab0e12cb5..7a666d745ea 100644 --- a/boa_parser/src/lexer/template.rs +++ b/boa_parser/src/lexer/template.rs @@ -1,4 +1,4 @@ -//! This module implements lexing for template literals used in the JavaScript programing language. +//! Boa's lexing for ECMAScript template literals. use crate::lexer::{ string::{StringLiteral, UTF16CodeUnitsBuffer}, diff --git a/boa_parser/src/lexer/token.rs b/boa_parser/src/lexer/token.rs index df752d6893f..5fcd06cb1d1 100644 --- a/boa_parser/src/lexer/token.rs +++ b/boa_parser/src/lexer/token.rs @@ -1,4 +1,4 @@ -//! This module implements all of the [Token]s used in the JavaScript programing language. +//! Boa's implementation of all ECMAScript [Token]s. //! //! More information: //! - [ECMAScript reference][spec]