pub enum TokenKind {
Ident(String),
Argument(String),
DoubleQuotedString(String),
SingleQuotedString(String),
Variable(String),
Semicolon,
OpenBrace,
CloseBrace,
Comment(String),
Newline,
Eof,
}Expand description
Token types for nginx configuration
Variants§
Ident(String)
Identifier or keyword (http, server, listen, more_set_headers, etc.)
Argument(String)
Unquoted argument (80, /path/to/file, on, off, etc.) Arguments can contain special chars like *, ?, etc.
DoubleQuotedString(String)
Double-quoted string (includes the processed content without quotes)
SingleQuotedString(String)
Single-quoted string (includes the processed content without quotes)
Variable(String)
Variable ($variable_name)
Semicolon
Semicolon ;
OpenBrace
Open brace {
CloseBrace
Close brace }
Comment(String)
Comment (# …)
Newline
Newline (for tracking blank lines)
Eof
End of file
Implementations§
Trait Implementations§
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnsafeUnpin for TokenKind
impl UnwindSafe for TokenKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more