diff options
Diffstat (limited to 'support/texlab/crates/parser/src/latex/lexer/types.rs')
-rw-r--r-- | support/texlab/crates/parser/src/latex/lexer/types.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/support/texlab/crates/parser/src/latex/lexer/types.rs b/support/texlab/crates/parser/src/latex/lexer/types.rs index eea6ea3b44..607138a448 100644 --- a/support/texlab/crates/parser/src/latex/lexer/types.rs +++ b/support/texlab/crates/parser/src/latex/lexer/types.rs @@ -58,7 +58,7 @@ fn lex_command_name(lexer: &mut logos::Lexer<Token>) -> CommandName { return CommandName::Generic; } - while let Some(c) = chars.next() { + for c in chars { match c { '*' => { lexer.bump(c.len_utf8()); @@ -87,6 +87,7 @@ pub enum CommandName { BeginEquation, EndEquation, Section(SectionLevel), + Paragraph(ParagraphLevel), EnumItem, Caption, Citation, @@ -111,7 +112,8 @@ pub enum CommandName { AcronymDefinition, AcronymDeclaration, AcronymReference, - TheoremDefinition, + TheoremDefinitionAmsThm, + TheoremDefinitionThmTools, ColorReference, ColorDefinition, ColorSetDefinition, @@ -130,6 +132,10 @@ pub enum SectionLevel { Section, Subsection, Subsubsection, +} + +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)] +pub enum ParagraphLevel { Paragraph, Subparagraph, } |