pub enum JTokenType {
Show 34 variants
Whitespace,
Newline,
Comment,
StringLiteral,
NumberLiteral,
Identifier,
Equal,
Dot,
Colon,
IsGlobal,
IsLocal,
Plus,
Minus,
Star,
Percent,
Dollar,
Comma,
Hash,
Slash,
Backslash,
Pipe,
Ampersand,
Caret,
Tilde,
Less,
Greater,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Eof,
Error,
}Expand description
J token type
Variants§
Whitespace
Whitespace
Newline
Newline
Comment
Comment
StringLiteral
String literal
NumberLiteral
Number literal
Identifier
Identifier
Equal
Equal (=)
Dot
Dot (.)
Colon
Colon (:)
IsGlobal
Global assignment (=:)
IsLocal
Local assignment (=.)
Plus
Plus (+)
Minus
Minus (-)
Star
Star (*)
Percent
Percent (%)
Dollar
Dollar ($)
Comma
Comma (,)
Hash
Hash (#)
Slash
Slash (/)
Backslash
Backslash ()
Pipe
Pipe (|)
Ampersand
Ampersand (&)
Caret
Caret (^)
Tilde
Tilde (~)
Less
Less (<)
Greater
Greater (>)
LeftParen
Left parenthesis (()
RightParen
Right parenthesis ())
LeftBracket
Left bracket ([)
RightBracket
Right bracket (])
LeftBrace
Left brace ({)
RightBrace
Right brace (})
Eof
End of file
Error
Error unit
Implementations§
Source§impl JTokenType
impl JTokenType
Sourcepub fn is_keyword(&self) -> bool
pub fn is_keyword(&self) -> bool
Is keyword (J mostly uses primitives)
Sourcepub fn is_punctuation(&self) -> bool
pub fn is_punctuation(&self) -> bool
Is punctuation
Sourcepub fn is_ignored(&self) -> bool
pub fn is_ignored(&self) -> bool
Is ignored token (whitespace or comment)
Trait Implementations§
Source§impl Clone for JTokenType
impl Clone for JTokenType
Source§fn clone(&self) -> JTokenType
fn clone(&self) -> JTokenType
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 JTokenType
impl Debug for JTokenType
Source§impl<'de> Deserialize<'de> for JTokenType
impl<'de> Deserialize<'de> for JTokenType
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<JTokenType> for JElementType
impl From<JTokenType> for JElementType
Source§fn from(token: JTokenType) -> Self
fn from(token: JTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for JTokenType
impl Hash for JTokenType
Source§impl Ord for JTokenType
impl Ord for JTokenType
Source§fn cmp(&self, other: &JTokenType) -> Ordering
fn cmp(&self, other: &JTokenType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for JTokenType
impl PartialEq for JTokenType
Source§impl PartialOrd for JTokenType
impl PartialOrd for JTokenType
Source§impl Serialize for JTokenType
impl Serialize for JTokenType
Source§impl TokenType for JTokenType
impl TokenType for JTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
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_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_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.).
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 JTokenType
impl Eq for JTokenType
impl StructuralPartialEq for JTokenType
Auto Trait Implementations§
impl Freeze for JTokenType
impl RefUnwindSafe for JTokenType
impl Send for JTokenType
impl Sync for JTokenType
impl Unpin for JTokenType
impl UnsafeUnpin for JTokenType
impl UnwindSafe for JTokenType
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