[−][src]Crate ruby_parser
Ruby Lexer - a library for parsing Ruby syntax
ruby-lexer is a library that provides the APIs needed to lex the Ruby programming language's syntax into a stream of tokens.
Parser combinators
This library is provided as a set of parser combinator functions, powered by nom. All of the parser combinators are structured to semantically reflect the ISO Ruby specification, but minor deviations from the spec have been made when necessary (namely, re-ordering alternative parsers to consume the largest production first).
The top-level parser combinators that return tokens are publically exported within the lexers module.
Macros
use_parser | Defines the functions used by the |
Structs
Metadata | Tracks lexer-specific metadata |
TrackedLocation | Tracks location information and user-defined metadata for nom's source input. |
Enums
ErrorKind | indicates which parser returned an error |
Interpolatable | Defines something that may be interpolated |
Token | Defines the tokens that are returned as a result of lexing |
Functions
parse | Parses a ruby program |
tokenize | Tokenizes a ruby program |
Type Definitions
Expression | Describes a list of tokens that make up an expression |
Input | Describes the lexer's input type |
StatementList | Describes a list of statements |