summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorKian-Meng Ang <kianmeng.ang@gmail.com>2023-03-22 16:02:51 +0800
committerGitHub <noreply@github.com>2023-03-22 09:02:51 +0100
commit25acefeb5b0cf0977ad01fe3128d494d9617a2cf (patch)
tree5f629b2aee909022be2be674a60d10fe59bc77c3 /src/syntax
parent26f4321a5e9eb56b905ca9eee9cf52422c7ff859 (diff)
Fix typos (#115)
Found via `codespell -S target -L crate,ist,thi,alle,dedented,ue,tung,nd,ende,overriden,dependant`
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/ast.rs10
-rw-r--r--src/syntax/kind.rs2
-rw-r--r--src/syntax/source.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs
index 73aa41e1..bd8fa230 100644
--- a/src/syntax/ast.rs
+++ b/src/syntax/ast.rs
@@ -652,7 +652,7 @@ impl Heading {
self.0.cast_first_match().unwrap_or_default()
}
- /// The section depth (numer of equals signs).
+ /// The section depth (number of equals signs).
pub fn level(&self) -> NonZeroUsize {
self.0
.children()
@@ -1085,7 +1085,7 @@ impl Array {
pub enum ArrayItem {
/// A bare expression: `12`.
Pos(Expr),
- /// A spreaded expression: `..things`.
+ /// A spread expression: `..things`.
Spread(Expr),
}
@@ -1117,14 +1117,14 @@ impl Dict {
}
}
-/// An item in an dictionary expresssion.
+/// An item in an dictionary expression.
#[derive(Debug, Clone, Hash)]
pub enum DictItem {
/// A named pair: `thickness: 3pt`.
Named(Named),
/// A keyed pair: `"spacy key": true`.
Keyed(Keyed),
- /// A spreaded expression: `..things`.
+ /// A spread expression: `..things`.
Spread(Expr),
}
@@ -1484,7 +1484,7 @@ pub enum Arg {
Pos(Expr),
/// A named argument: `draw: false`.
Named(Named),
- /// A spreaded argument: `..things`.
+ /// A spread argument: `..things`.
Spread(Expr),
}
diff --git a/src/syntax/kind.rs b/src/syntax/kind.rs
index c96539d1..b0d934d1 100644
--- a/src/syntax/kind.rs
+++ b/src/syntax/kind.rs
@@ -212,7 +212,7 @@ pub enum SyntaxKind {
FuncCall,
/// A function call's argument list: `(12pt, y)`.
Args,
- /// Spreaded arguments or an argument sink: `..x`.
+ /// Spread arguments or an argument sink: `..x`.
Spread,
/// A closure: `(x, y) => z`.
Closure,
diff --git a/src/syntax/source.rs b/src/syntax/source.rs
index 53cc6de9..e8553b1e 100644
--- a/src/syntax/source.rs
+++ b/src/syntax/source.rs
@@ -425,7 +425,7 @@ mod tests {
assert_eq!(source.lines, result.lines);
}
- // Test inserting at the begining.
+ // Test inserting at the beginning.
test("abc\n", 0..0, "hi\n", "hi\nabc\n");
test("\nabc", 0..0, "hi\r", "hi\r\nabc");