emmylua_parser 0.25.0

A parser for EmmyLua and luals
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod doc;
mod lua;

use crate::{parser::CompleteMarker, parser_error::LuaParseError};
pub use doc::parse_comment;
pub use lua::parse_chunk;

type ParseResult = Result<CompleteMarker, ParseFailReason>;
type DocParseResult = Result<CompleteMarker, LuaParseError>;
pub enum ParseFailReason {
    /// Parsing was stopped due to reaching the end of the file.
    Eof,
    /// Parsing was stopped due to encountering an unexpected token.
    UnexpectedToken,
}