summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-01-06 12:50:20 +0100
committerLaurenz <laurmaedje@gmail.com>2020-01-06 12:50:20 +0100
commita93b1ab003affb0d72e9da4007b04a2a6cfd4462 (patch)
treebdc6f1c14259e7745fa59c7e51d8327ee5df3061 /src/syntax
parent2ee5810fecb96a8d4e0d078faecc8c91096d6881 (diff)
Formatting 🛀
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/mod.rs1
-rw-r--r--src/syntax/parsing.rs1
-rw-r--r--src/syntax/span.rs1
-rw-r--r--src/syntax/tokens.rs1
4 files changed, 4 insertions, 0 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index 193810c0..cb801627 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -10,6 +10,7 @@ pub_use_mod!(tokens);
pub_use_mod!(parsing);
pub_use_mod!(span);
+
/// A logical unit of the incoming text stream.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum Token<'s> {
diff --git a/src/syntax/parsing.rs b/src/syntax/parsing.rs
index 6eed2235..2f061372 100644
--- a/src/syntax/parsing.rs
+++ b/src/syntax/parsing.rs
@@ -4,6 +4,7 @@ use crate::func::Scope;
use crate::size::Size;
use super::*;
+
/// The result type for parsing.
pub type ParseResult<T> = crate::TypesetResult<T>;
diff --git a/src/syntax/span.rs b/src/syntax/span.rs
index 9e018437..3f752385 100644
--- a/src/syntax/span.rs
+++ b/src/syntax/span.rs
@@ -2,6 +2,7 @@
use std::fmt::{self, Display, Formatter};
+
/// Annotates a value with the part of the source code it corresponds to.
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Spanned<T> {
diff --git a/src/syntax/tokens.rs b/src/syntax/tokens.rs
index 85e89be4..f5854d8f 100644
--- a/src/syntax/tokens.rs
+++ b/src/syntax/tokens.rs
@@ -5,6 +5,7 @@ use smallvec::SmallVec;
use super::*;
+
/// Builds an iterator over the tokens of the source code.
pub fn tokenize(src: &str) -> Tokens {
Tokens::new(src)