-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
986bff5
commit 809932a
Showing
17 changed files
with
514 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <ruby.h> | ||
#include "liquid.h" | ||
#include "document.h" | ||
#include "parse_context.h" | ||
#include "document_body.h" | ||
|
||
static ID id_parse; | ||
static VALUE cLiquidDocument; | ||
|
||
VALUE document_parse(VALUE tokenizer, VALUE parse_context) | ||
{ | ||
return rb_funcall(cLiquidDocument, id_parse, 2, tokenizer, parse_context); | ||
} | ||
|
||
void liquid_define_document() | ||
{ | ||
id_parse = rb_intern("parse"); | ||
|
||
cLiquidDocument = rb_const_get(mLiquid, rb_intern("Document")); | ||
rb_global_variable(&cLiquidDocument); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef LIQUID_DOCUMENT_H | ||
#define LIQUID_DOCUMENT_H | ||
|
||
void liquid_define_document(); | ||
VALUE document_parse(VALUE tokenizer, VALUE parse_context); | ||
|
||
#endif |
Oops, something went wrong.