Skip to main content

TexTokenType

Enum TexTokenType 

Source
#[repr(u8)]
pub enum TexTokenType {
Show 163 variants Root = 0, SourceFile = 1, Document = 2, Command = 3, Environment = 4, BeginEnvironment = 5, EndEnvironment = 6, MathMode = 7, InlineMath = 8, DisplayMath = 9, Group = 10, Superscript = 11, Subscript = 12, Argument = 13, OptionalArgument = 14, MandatoryArgument = 15, Text = 16, Paragraph = 17, Section = 18, Subsection = 19, Subsubsection = 20, List = 21, Item = 22, Table = 23, Row = 24, Cell = 25, Label = 26, Reference = 27, Citation = 28, Figure = 29, Caption = 30, Error = 31, DocumentClass = 32, UsePackage = 33, Begin = 34, End = 35, Section_ = 36, Subsection_ = 37, Subsubsection_ = 38, Chapter = 39, Part = 40, Title = 41, Author = 42, Date = 43, MakeTitle = 44, TableOfContents = 45, NewPage = 46, ClearPage = 47, Frac = 48, Sqrt = 49, Sum = 50, Int = 51, Lim = 52, Alpha = 53, Beta = 54, Gamma = 55, Delta = 56, Epsilon = 57, Zeta = 58, Eta = 59, Theta = 60, Iota = 61, Kappa = 62, Lambda = 63, Mu = 64, Nu = 65, Xi = 66, Omicron = 67, Pi = 68, Rho = 69, Sigma = 70, Tau = 71, Upsilon = 72, Phi = 73, Chi = 74, Psi = 75, Omega = 76, VarEpsilon = 77, VarTheta = 78, VarKappa = 79, VarPi = 80, VarRho = 81, VarSigma = 82, VarPhi = 83, UpperGamma = 84, UpperDelta = 85, UpperTheta = 86, UpperLambda = 87, UpperXi = 88, UpperPi = 89, UpperSigma = 90, UpperUpsilon = 91, UpperPhi = 92, UpperPsi = 93, UpperOmega = 94, TextBf = 95, TextIt = 96, TextSc = 97, TextTt = 98, Emph = 99, Underline = 100, Identifier = 101, StringLiteral = 102, Number = 103, Backslash = 104, LeftBrace = 105, RightBrace = 106, LeftBracket = 107, RightBracket = 108, LeftParen = 109, RightParen = 110, Dollar = 111, DoubleDollar = 112, Ampersand = 113, Percent = 114, Hash = 115, Caret = 116, Underscore = 117, Tilde = 118, Equal = 119, Equals = 120, Plus = 121, Minus = 122, Star = 123, Slash = 124, Pipe = 125, Less = 126, LessThan = 127, Greater = 128, GreaterThan = 129, Exclamation = 130, Question = 131, At = 132, Colon = 133, Semicolon = 134, Comma = 135, Dot = 136, Comment = 137, Whitespace = 138, Newline = 139, BeginKeyword = 140, EndKeyword = 141, DocumentclassKeyword = 142, UsepackageKeyword = 143, SectionKeyword = 144, SubsectionKeyword = 145, SubsubsectionKeyword = 146, ChapterKeyword = 147, PartKeyword = 148, TitleKeyword = 149, AuthorKeyword = 150, DateKeyword = 151, MaketitleKeyword = 152, TableofcontentsKeyword = 153, ItemKeyword = 154, LabelKeyword = 155, RefKeyword = 156, CiteKeyword = 157, IncludegraphicsKeyword = 158, TextbfKeyword = 159, TextitKeyword = 160, EmphKeyword = 161, Eof = 162,
}
Expand description

TeX token types.

Variants§

§

Root = 0

Root node of the TeX file.

§

SourceFile = 1

Source file.

§

Document = 2

Document environment.

§

Command = 3

Generic command.

§

Environment = 4

Generic environment.

§

BeginEnvironment = 5

Start of an environment (\begin).

§

EndEnvironment = 6

End of an environment (\end).

§

MathMode = 7

Math mode content.

§

InlineMath = 8

Inline math mode ($…$ or (…)).

§

DisplayMath = 9

Display math mode ($$…$$ or […]).

§

Group = 10

Grouped content ({…}).

§

Superscript = 11

Superscript (^).

§

Subscript = 12

Subscript (_).

§

Argument = 13

Generic argument.

§

OptionalArgument = 14

Optional argument ([…]).

§

MandatoryArgument = 15

Mandatory argument ({…}).

§

Text = 16

Text content.

§

Paragraph = 17

Paragraph.

§

Section = 18

Section.

§

Subsection = 19

Subsection.

§

Subsubsection = 20

Subsubsection.

§

List = 21

List environment.

§

Item = 22

Item in a list (\item).

§

Table = 23

Table environment.

§

Row = 24

Row in a table.

§

Cell = 25

Cell in a table.

§

Label = 26

Label definition (\label).

§

Reference = 27

Reference to a label (\ref).

§

Citation = 28

Citation (\cite).

§

Figure = 29

Figure environment.

§

Caption = 30

Caption (\caption).

§

Error = 31

Error token.

§

DocumentClass = 32

\documentclass command.

§

UsePackage = 33

\usepackage command.

§

Begin = 34

\begin command.

§

End = 35

\end command.

§

Section_ = 36

\section command.

§

Subsection_ = 37

\subsection command.

§

Subsubsection_ = 38

\subsubsection command.

§

Chapter = 39

\chapter command.

§

Part = 40

\part command.

§

Title = 41

\title command.

§

Author = 42

\author command.

§

Date = 43

\date command.

§

MakeTitle = 44

\maketitle command.

§

TableOfContents = 45

\tableofcontents command.

§

NewPage = 46

\newpage command.

§

ClearPage = 47

\clearpage command.

§

Frac = 48

\frac command.

§

Sqrt = 49

\sqrt command.

§

Sum = 50

\sum command.

§

Int = 51

\int command.

§

Lim = 52

\lim command.

§

Alpha = 53

\alpha Greek letter.

§

Beta = 54

\beta Greek letter.

§

Gamma = 55

\gamma Greek letter.

§

Delta = 56

\delta Greek letter.

§

Epsilon = 57

\epsilon Greek letter.

§

Zeta = 58

\zeta Greek letter.

§

Eta = 59

\eta Greek letter.

§

Theta = 60

\theta Greek letter.

§

Iota = 61

\iota Greek letter.

§

Kappa = 62

\kappa Greek letter.

§

Lambda = 63

\lambda Greek letter.

§

Mu = 64

\mu Greek letter.

§

Nu = 65

\nu Greek letter.

§

Xi = 66

\xi Greek letter.

§

Omicron = 67

\omicron Greek letter.

§

Pi = 68

\pi Greek letter.

§

Rho = 69

\rho Greek letter.

§

Sigma = 70

\sigma Greek letter.

§

Tau = 71

\tau Greek letter.

§

Upsilon = 72

\upsilon Greek letter.

§

Phi = 73

\phi Greek letter.

§

Chi = 74

\chi Greek letter.

§

Psi = 75

\psi Greek letter.

§

Omega = 76

\omega Greek letter.

§

VarEpsilon = 77

\varepsilon Greek letter.

§

VarTheta = 78

\vartheta Greek letter.

§

VarKappa = 79

\varkappa Greek letter.

§

VarPi = 80

\varpi Greek letter.

§

VarRho = 81

\varrho Greek letter.

§

VarSigma = 82

\varsigma Greek letter.

§

VarPhi = 83

\varphi Greek letter.

§

UpperGamma = 84

\Gamma Greek letter.

§

UpperDelta = 85

\Delta Greek letter.

§

UpperTheta = 86

\Theta Greek letter.

§

UpperLambda = 87

\Lambda Greek letter.

§

UpperXi = 88

\Xi Greek letter.

§

UpperPi = 89

\Pi Greek letter.

§

UpperSigma = 90

\Sigma Greek letter.

§

UpperUpsilon = 91

\Upsilon Greek letter.

§

UpperPhi = 92

\Phi Greek letter.

§

UpperPsi = 93

\Psi Greek letter.

§

UpperOmega = 94

\Omega Greek letter.

§

TextBf = 95

\textbf command.

§

TextIt = 96

\textit command.

§

TextSc = 97

\textsc command.

§

TextTt = 98

\texttt command.

§

Emph = 99

\emph command.

§

Underline = 100

\underline command.

§

Identifier = 101

Identifier.

§

StringLiteral = 102

String literal.

§

Number = 103

Numeric literal.

§

Backslash = 104

Backslash ().

§

LeftBrace = 105

Left brace ({).

§

RightBrace = 106

Right brace (}).

§

LeftBracket = 107

Left bracket ([).

§

RightBracket = 108

Right bracket (]).

§

LeftParen = 109

Left parenthesis (().

§

RightParen = 110

Right parenthesis ()).

§

Dollar = 111

Dollar sign ($).

§

DoubleDollar = 112

Double dollar sign ($$).

§

Ampersand = 113

Ampersand (&).

§

Percent = 114

Percent sign (%).

§

Hash = 115

Hash sign (#).

§

Caret = 116

Caret sign (^).

§

Underscore = 117

Underscore (_).

§

Tilde = 118

Tilde (~).

§

Equal = 119

Equal sign (=).

§

Equals = 120

Equals sign (alternative).

§

Plus = 121

Plus sign (+).

§

Minus = 122

Minus sign (-).

§

Star = 123

Star sign (*).

§

Slash = 124

Slash sign (/).

§

Pipe = 125

Pipe sign (|).

§

Less = 126

Less than sign (<).

§

LessThan = 127

Less than sign (alternative).

§

Greater = 128

Greater than sign (>).

§

GreaterThan = 129

Greater than sign (alternative).

§

Exclamation = 130

Exclamation mark (!).

§

Question = 131

Question mark (?).

§

At = 132

At sign (@).

§

Colon = 133

Colon (:).

§

Semicolon = 134

Semicolon (;).

§

Comma = 135

Comma (,).

§

Dot = 136

Dot (.).

§

Comment = 137

Comment (% …).

§

Whitespace = 138

Whitespace.

§

Newline = 139

Newline.

§

BeginKeyword = 140

‘begin’ keyword.

§

EndKeyword = 141

‘end’ keyword.

§

DocumentclassKeyword = 142

‘documentclass’ keyword.

§

UsepackageKeyword = 143

‘usepackage’ keyword.

§

SectionKeyword = 144

‘section’ keyword.

§

SubsectionKeyword = 145

‘subsection’ keyword.

§

SubsubsectionKeyword = 146

‘subsubsection’ keyword.

§

ChapterKeyword = 147

‘chapter’ keyword.

§

PartKeyword = 148

‘part’ keyword.

§

TitleKeyword = 149

‘title’ keyword.

§

AuthorKeyword = 150

‘author’ keyword.

§

DateKeyword = 151

‘date’ keyword.

§

MaketitleKeyword = 152

‘maketitle’ keyword.

§

TableofcontentsKeyword = 153

‘tableofcontents’ keyword.

§

ItemKeyword = 154

‘item’ keyword.

§

LabelKeyword = 155

‘label’ keyword.

§

RefKeyword = 156

‘ref’ keyword.

§

CiteKeyword = 157

‘cite’ keyword.

§

IncludegraphicsKeyword = 158

‘includegraphics’ keyword.

§

TextbfKeyword = 159

‘textbf’ keyword.

§

TextitKeyword = 160

‘textit’ keyword.

§

EmphKeyword = 161

‘emph’ keyword.

§

Eof = 162

End of stream.

Trait Implementations§

Source§

impl Clone for TexTokenType

Source§

fn clone(&self) -> TexTokenType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TexTokenType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TexTokenType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<TexElementType> for TexTokenType

Source§

fn from(element: TexElementType) -> Self

Converts to this type from the input type.
Source§

impl From<TexTokenType> for TexElementType

Source§

fn from(token: TexTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for TexTokenType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TexTokenType

Source§

fn eq(&self, other: &TexTokenType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TexTokenType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TokenType for TexTokenType

Source§

const END_OF_STREAM: Self = Self::Eof

A constant representing the end of the input stream.
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

fn is_ignored(&self) -> bool

Returns true if this token represents trivia (whitespace, comments, etc.).
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this token. Read more
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this token matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalTokenRole) -> bool

Returns true if this token matches the specified universal role.
Source§

fn is_comment(&self) -> bool

Returns true if this token represents a comment.
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace.
Source§

fn is_error(&self) -> bool

Returns true if this token represents an error condition.
Source§

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream.
Source§

impl Copy for TexTokenType

Source§

impl Eq for TexTokenType

Source§

impl StructuralPartialEq for TexTokenType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,