A small drafter binding. As redsnow is outdated and deprecated, we implemented a binding for the parsing method of drafter.
The drafter version used by the current Lounge Lizard version is 3.2.2
This is just ruby wrapper to use Drafter. Check drafter's repository for more info
$ gem install lounge_lizard
LoungeLizard.parse(mson_string_content)
will return a hash representing the AST of the mson file.
You can also call the c++ function directly. For an example, just check lib/lounge_lizard.rb
:
LoungeLizard.drafter_parse_blueprint_to(mson_string_content, ffi_pointer, options_struct)
-
Clone the repo + fetch the submodules(this is, drafter and its dependencies):
$ git clone git://github.com/moviepilot/lounge_lizard.git $ cd lounge_lizard $ git submodule update --init --recursive
-
Lounge Lizard has drafter as a native extension. This meaning, drafter is a c++ library you need to compile it before using it.
rake
will take care of compiling it:$ rake
The way this gem is build is very similar to redsnow. So cheers to them!
MIT License. See the LICENSE file.