jsompiler_common
The jsompiler_common
is part of jsompiler, a Rust based JavaScript compiler.
It contains shared components and functionalities, which is to be used by other parts of the compiler.
API Documentation
The code contains ErrorKind
enum and an Error
struct for error handling required for the Lexer and Parser.
ErrorKind
enumerates possible types of errors: lexer, syntax, semantic, and unexpected token errors.- The
Error
struct holds details about an error, including its type, a message, the line number, and position where it occurred. - The
Error::new
function creates a new error with specified details.