Skip to content
/ lua_rust Public

lua syntax parser in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ehwan/lua_rust

Repository files navigation

lua_rust

lua syntax parser in Rust

project structure

  • tokenizer: tokenizing lua code string.
  • parser: parsing tokenized lua code into AST.
  • semantics: semantic analysis of generated AST. It generates a Enhanced AST which contains more information than the original AST.
    • stack offset of local variables
    • scope checking for return, break, goto, label, ...
    • split function definition into separated Chunks

Cargo Features

  • 32bit: use 32bit integer and float for lua numeric type
  • diag: enable to_diag() function for ParseError

how to run

$ cargo run <source_file.lua>

will print the pretty-formatted Debug output of the AST ( "{:#?}" )

About

lua syntax parser in Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published