pub enum Lexicon {
Show 17 variants Keyword(Keyword), Identifier(String), String(String), Help(String), EqualityOperator(EqualityOperator), ImmediateAssignment, Assignment, AppendAssignment, Not, MacroOpen, Open, Close, Comma, EOT, Error(String), And, Or,
}
Expand description

There are a certain amount of basic tokens found within a stream of tokens belonging to a Kconfig configuration specification. These tokens are outlined here.

Variants

Keyword(Keyword)

Keywords such as config, menuconfig, if, comment, source …

Identifier(String)

Identifier, specifically used for assignment and evaluation

String(String)

Strings, encapsulated in double quotes

Help(String)

Help text, indented when a “Help” section was started

EqualityOperator(EqualityOperator)

An equality operator, such as <=, ==, etc.

ImmediateAssignment

An immediate assignment, e.g.: :=

Assignment

A normal assignment, e.g.: =

AppendAssignment

An appendage assignment, e.g.: +=

Not

An inverse of an expression

MacroOpen

Start a macro definition with “$(”

Open

Start a normal definition with “(”

Close

Ends a definition (either macro or normal) with “)”

Comma

A comma, typically used as an argument separator

EOT

End of transmission, used when no more tokens can be found

Error(String)

Error, used when the found token is illegal

And

The ‘&&’ expression

Or

The ‘||’ expression

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.