Skip to main content

TexElementType

Enum TexElementType 

Source
#[repr(u8)]
pub enum TexElementType {
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

Represents an element type in a TeX document.

Variants§

§

Root = 0

Root node of the AST.

§

SourceFile = 1

A source file containing TeX content.

§

Document = 2

The document body.

§

Command = 3

A TeX command (e.g., \section).

§

Environment = 4

A TeX environment (e.g., \begin{itemize}…\end{itemize}).

§

BeginEnvironment = 5

The beginning of an environment.

§

EndEnvironment = 6

The end of an environment.

§

MathMode = 7

Mathematical content.

§

InlineMath = 8

Inline mathematical content ($…$).

§

DisplayMath = 9

Displayed mathematical content ($$…$$).

§

Group = 10

A grouped set of elements ({…}).

§

Superscript = 11

A superscript expression (^…).

§

Subscript = 12

A subscript expression (_…).

§

Argument = 13

A generic command argument.

§

OptionalArgument = 14

An optional command argument ([…]).

§

MandatoryArgument = 15

A mandatory command argument ({…}).

§

Text = 16

Plain text content.

§

Paragraph = 17

A paragraph of text.

§

Section = 18

A section heading.

§

Subsection = 19

A subsection heading.

§

Subsubsection = 20

A subsubsection heading.

§

List = 21

A list environment.

§

Item = 22

An item within a list.

§

Table = 23

A table environment.

§

Row = 24

A row within a table.

§

Cell = 25

A cell within a table row.

§

Label = 26

A label for cross-referencing.

§

Reference = 27

A reference to a label.

§

Citation = 28

A bibliographic citation.

§

Figure = 29

A figure environment.

§

Caption = 30

A caption for a figure or table.

§

Error = 31

An error node representing a syntax error.

§

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 command.

§

Beta = 54

\beta command.

§

Gamma = 55

\gamma command.

§

Delta = 56

\delta command.

§

Epsilon = 57

\epsilon command.

§

Zeta = 58

\zeta command.

§

Eta = 59

\eta command.

§

Theta = 60

\theta command.

§

Iota = 61

\iota command.

§

Kappa = 62

\kappa command.

§

Lambda = 63

\lambda command.

§

Mu = 64

\mu command.

§

Nu = 65

\nu command.

§

Xi = 66

\xi command.

§

Omicron = 67

\omicron command.

§

Pi = 68

\pi command.

§

Rho = 69

\rho command.

§

Sigma = 70

\sigma command.

§

Tau = 71

\tau command.

§

Upsilon = 72

\upsilon command.

§

Phi = 73

\phi command.

§

Chi = 74

\chi command.

§

Psi = 75

\psi command.

§

Omega = 76

\omega command.

§

VarEpsilon = 77

\varepsilon command.

§

VarTheta = 78

\vartheta command.

§

VarKappa = 79

\varkappa command.

§

VarPi = 80

\varpi command.

§

VarRho = 81

\varrho command.

§

VarSigma = 82

\varsigma command.

§

VarPhi = 83

\varphi command.

§

UpperGamma = 84

\Gamma command.

§

UpperDelta = 85

\Delta command.

§

UpperTheta = 86

\Theta command.

§

UpperLambda = 87

\Lambda command.

§

UpperXi = 88

\Xi command.

§

UpperPi = 89

\Pi command.

§

UpperSigma = 90

\Sigma command.

§

UpperUpsilon = 91

\Upsilon command.

§

UpperPhi = 92

\Phi command.

§

UpperPsi = 93

\Psi command.

§

UpperOmega = 94

\Omega command.

§

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

An identifier.

§

StringLiteral = 102

A string literal.

§

Number = 103

A numeric literal.

§

Backslash = 104

Backslash character ().

§

LeftBrace = 105

Left brace character ({).

§

RightBrace = 106

Right brace character (}).

§

LeftBracket = 107

Left bracket character ([).

§

RightBracket = 108

Right bracket character (]).

§

LeftParen = 109

Left parenthesis character (().

§

RightParen = 110

Right parenthesis character ()).

§

Dollar = 111

Dollar sign character ($).

§

DoubleDollar = 112

Double dollar sign character ($$).

§

Ampersand = 113

Ampersand character (&).

§

Percent = 114

Percent character (%).

§

Hash = 115

Hash character (#).

§

Caret = 116

Caret character (^).

§

Underscore = 117

Underscore character (_).

§

Tilde = 118

Tilde character (~).

§

Equal = 119

Equals character (=).

§

Equals = 120

Double equals character (==).

§

Plus = 121

Plus character (+).

§

Minus = 122

Minus character (-).

§

Star = 123

Asterisk character (*).

§

Slash = 124

Slash character (/).

§

Pipe = 125

Pipe character (|).

§

Less = 126

Less than character (<).

§

LessThan = 127

Less than or equal to character (<=).

§

Greater = 128

Greater than character (>).

§

GreaterThan = 129

Greater than or equal to character (>=).

§

Exclamation = 130

Exclamation mark character (!).

§

Question = 131

Question mark character (?).

§

At = 132

At sign character (@).

§

Colon = 133

Colon character (:).

§

Semicolon = 134

Semicolon character (;).

§

Comma = 135

Comma character (,).

§

Dot = 136

Dot character (.).

§

Comment = 137

A comment starting with %.

§

Whitespace = 138

Whitespace characters.

§

Newline = 139

A newline character.

§

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 file marker.

Trait Implementations§

Source§

impl Clone for TexElementType

Source§

fn clone(&self) -> TexElementType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for TexElementType

Source§

impl Debug for TexElementType

Source§

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

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

impl<'de> Deserialize<'de> for TexElementType

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 ElementType for TexElementType

Source§

type Role = UniversalElementRole

The associated role type for this element kind.
Source§

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

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

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

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

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

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

fn is_root(&self) -> bool

Returns true if this element represents the root of the parsed tree.
Source§

fn is_error(&self) -> bool

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

impl Eq for TexElementType

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 TexElementType

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 TexElementType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 TexElementType

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 StructuralPartialEq for TexElementType

Source§

impl TokenType for TexElementType

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.

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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