Enum conch_parser::token::Token [] [src]

pub enum Token {
    Newline,
    ParenOpen,
    ParenClose,
    CurlyOpen,
    CurlyClose,
    SquareOpen,
    SquareClose,
    Bang,
    Tilde,
    Pound,
    Star,
    Question,
    Backslash,
    Percent,
    Dash,
    Equals,
    Plus,
    Colon,
    At,
    Caret,
    Slash,
    Comma,
    SingleQuote,
    DoubleQuote,
    Backtick,
    Semi,
    Amp,
    Pipe,
    AndIf,
    OrIf,
    DSemi,
    Less,
    Great,
    DLess,
    DGreat,
    GreatAnd,
    LessAnd,
    DLessDash,
    Clobber,
    LessGreat,
    Dollar,
    ParamPositional(Positional),
    Whitespace(String),
    Literal(String),
    Name(String),
}

The representation of (context free) shell tokens.

Variants

\n

(

)

{

}

[

]

!

~

#

*

?

\

%

-

=

+

:

@

^

/

,

'

"

`

;

&

|

&&

||

;;

<

>

<<

>>

>&

<&

<<-

>|

<>

$

$0, $1, ..., $9

Must be its own token to avoid lumping the positional parameter as a Literal if the parameter is concatenated to something.

Any string of whitespace characters NOT including a newline.

Any literal delimited by whitespace.

A Literal capable of being used as a variable or function name. According to the POSIX standard it should only contain alphanumerics or underscores, and does not start with a digit.

Methods

impl Token
[src]

Returns if the token's length is zero.

Returns the number of characters it took to recognize a token.

Indicates whether a word can be delimited by this token when the token is not quoted or escaped.

Gets a representation of the token as a string slice.

Trait Implementations

impl PartialEq for Token
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Token
[src]

impl Debug for Token
[src]

Formats the value using the given formatter.

impl Clone for Token
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Token
[src]

Formats the value using the given formatter. Read more