pub enum PrologTokenType {
Show 57 variants
Whitespace,
Newline,
Comment,
Atom,
Integer,
Float,
String,
Variable,
Unify,
NotUnify,
Equal,
NotEqual,
ArithEqual,
ArithNotEqual,
Less,
Greater,
LessEqual,
GreaterEqual,
Is,
Plus,
Minus,
Multiply,
Divide,
IntDivide,
Modulo,
Power,
BitwiseAnd,
BitwiseOr,
BitwiseXor,
BitwiseNot,
LeftShift,
RightShift,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Comma,
Dot,
Pipe,
Semicolon,
Cut,
Question,
Colon,
ColonMinus,
QuestionMinus,
Functor,
Clause,
Rule,
Fact,
Query,
Directive,
List,
Structure,
Root,
Error,
}Expand description
Prolog token types.
Variants§
Whitespace
Whitespace.
Newline
Newline.
Comment
Comment.
Atom
Atom.
Integer
Integer.
Float
Float.
String
String.
Variable
Variable.
Unify
Unification =.
NotUnify
Not unification \=.
Equal
Equal ==.
NotEqual
Not equal \==.
ArithEqual
Arithmetic equal =:=.
ArithNotEqual
Arithmetic not equal =\=.
Less
Less than <.
Greater
Greater than >.
LessEqual
Less or equal =<.
GreaterEqual
Greater or equal >=.
Is
Is is.
Plus
Plus +.
Minus
Minus -.
Multiply
Multiply *.
Divide
Divide /.
IntDivide
Integer divide //.
Modulo
Modulo mod.
Power
Power **.
BitwiseAnd
Bitwise and /\.
BitwiseOr
Bitwise or \/.
BitwiseXor
Bitwise xor xor.
BitwiseNot
Bitwise not \.
LeftShift
Left shift <<.
RightShift
Right shift >>.
LeftParen
Left parenthesis (.
RightParen
Right parenthesis ).
LeftBracket
Left bracket [.
RightBracket
Right bracket ].
LeftBrace
Left brace {.
RightBrace
Right brace }.
Comma
Comma ,.
Dot
Dot ..
Pipe
Pipe |.
Semicolon
Semicolon ;.
Cut
Cut !.
Question
Question mark ?.
Colon
Colon :.
ColonMinus
Colon minus :-.
QuestionMinus
Question minus ?-.
Functor
Functor.
Clause
Clause.
Rule
Rule.
Fact
Fact.
Query
Query.
Directive
Directive.
List
List.
Structure
Structure.
Root
Root.
Error
Error.
Implementations§
Trait Implementations§
Source§impl Clone for PrologTokenType
impl Clone for PrologTokenType
Source§fn clone(&self) -> PrologTokenType
fn clone(&self) -> PrologTokenType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrologTokenType
impl Debug for PrologTokenType
Source§impl<'de> Deserialize<'de> for PrologTokenType
impl<'de> Deserialize<'de> for PrologTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<PrologTokenType> for PrologElementType
impl From<PrologTokenType> for PrologElementType
Source§fn from(token: PrologTokenType) -> Self
fn from(token: PrologTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for PrologTokenType
impl Hash for PrologTokenType
Source§impl PartialEq for PrologTokenType
impl PartialEq for PrologTokenType
Source§impl Serialize for PrologTokenType
impl Serialize for PrologTokenType
Source§impl TokenType for PrologTokenType
impl TokenType for PrologTokenType
Source§const END_OF_STREAM: Self = Self::Error
const END_OF_STREAM: Self = Self::Error
A constant representing the end of the input stream.
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.).
Source§fn is_role(&self, role: Self::Role) -> bool
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
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment.
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace.
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream.
impl Copy for PrologTokenType
impl Eq for PrologTokenType
impl StructuralPartialEq for PrologTokenType
Auto Trait Implementations§
impl Freeze for PrologTokenType
impl RefUnwindSafe for PrologTokenType
impl Send for PrologTokenType
impl Sync for PrologTokenType
impl Unpin for PrologTokenType
impl UnsafeUnpin for PrologTokenType
impl UnwindSafe for PrologTokenType
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