Module prelude

Source
Expand description

Loads all needed items for outside crates to use.

Re-exports§

pub use crate::types::Comment;
pub use crate::parser::*;
pub use crate::types::*;

Modules§

comment
Comment struct
keyword
Keyword and PartialKeyword enums.
literal
Luau literals
operator
Operator and CompoundOperator structs.
symbol
Symbol struct.

Structs§

Lexer
The main component of this crate, the lexer.
ParseError
An error that can be met during parsing.
Position
A struct representing a specific point in a document. Lines and characters are zero-based.
State
A struct representing the state of a lexer at a specific time.
Token
A single token. Every lexable item becomes a token in Lexer::next_token().

Enums§

Comment
A comment.
CompoundOperator
A luau compound operator like += and //=
Keyword
Words that can only be used as be keywords. Check PartialKeyword.
LexerComment
A comment.
Literal
A Luau literal value
LuauNumber
A luau number. The stored string will include the 0b, or 0x. The only reason the different types actually exist is to allow the user to easily know which one is used without needing to check the actual string.
LuauString
A Luau string. The stored string will include the quotes/double quotes/backticks. The only reason the different types actually exist is to allow the user to easily know which one is used without needing to check the actual string.
Operator
A luau operator like + and -
PartialKeyword
Words that can be keywords or identifiers, depending on the context. Check Keyword.
Symbol
A luau symbol like ( and )
TokenType
All token types.

Traits§

Lexable
A trait which means this item can be lexed.

Type Aliases§

PositionComponent
Each component (line and character) in the Position struct.