Daniel James
18904dd490
Wonky path/file handling for partials.
...
The ruby version resolves partial paths to the current working
directory, this resolves them to the path of the current file. I can't
see it specified anywhere and this seems like better behaviour to me.
2016-05-19 23:19:08 +01:00
Daniel James
32c9ac5114
Make 'render' return a string.
2016-05-19 23:18:34 +01:00
Daniel James
73ccea8a16
Preset tokenizer regexp.
2016-05-18 18:54:31 +01:00
Daniel James
ddbe2d277e
Reindent interpret.
2016-05-18 18:54:31 +01:00
Daniel James
2059fc7c22
Convenience function for checking regexp matches.
2016-05-18 18:54:19 +01:00
Daniel James
e1f29e7df7
Hopefully better node representation.
2016-05-18 18:54:19 +01:00
Daniel James
831fc57a2e
Partials. Just from an array for now.
2016-05-18 18:54:19 +01:00
Daniel James
e8922d0698
Move parameters into a class, implementing proper lookup.
2016-05-18 18:54:18 +01:00
Daniel James
3bbbb5d883
Remove pointless array member.
2016-05-18 18:54:18 +01:00
Daniel James
59bbb4cb3d
Small clean-up. Mainly renaming variables.
2016-05-17 09:10:10 +01:00
Daniel James
7ea257f921
Single stack.
2016-05-17 09:10:10 +01:00
Daniel James
d26b41a12e
Update comment.
2016-05-17 09:10:10 +01:00
Daniel James
5d71cde30c
Support delimiters.
2016-05-17 09:10:10 +01:00
Daniel James
2487142d91
First stab at dotted variables.
2016-05-11 09:37:20 +01:00
Daniel James
34b41aa161
Remove pointless square brackets.
2016-05-11 09:37:19 +01:00
Daniel James
ecbcd71de8
Handle lists of values.
...
I don't think I need to check for any types other than objects/arrays
here. But I'm more interested in handling arbitrary templates than
arbitrary data.
2016-05-11 09:37:19 +01:00
Daniel James
9b6064dbb7
Slightly better error handling.
2016-05-11 09:37:17 +01:00
Daniel James
dd5eeeac38
Detect when tags fail to parse.
2016-05-11 09:37:03 +01:00
Daniel James
975d35a3cd
Some more things that aren't supported.
2016-05-11 09:13:02 +01:00
Daniel James
5162e5d86e
Handle standalone tags.
...
Messy!
2016-05-11 09:13:02 +01:00
Daniel James
8e3366480a
Get operator details before processing text.
...
Need to know the operator to handle standalone tags.
2016-05-11 09:13:02 +01:00
Daniel James
5e1ade2227
Allow whitespace in tags.
2016-05-11 09:13:02 +01:00
Daniel James
a14549192a
Function to render template to string.
2016-05-11 09:13:01 +01:00
Daniel James
1a3dedd63b
Update comment on Mustache support.
...
Might support lambdas? But don't think partials or set delimiters are
worth the bother.
2016-05-11 09:13:01 +01:00
Daniel James
1bb1664ad4
Unescaped html
2016-05-11 09:13:01 +01:00
Daniel James
7e1ecb8830
Named subpatterns.
2016-05-11 09:13:01 +01:00
Daniel James
d16dd734f4
Template comments.
2016-05-11 09:13:01 +01:00
Daniel James
6dcd19cb00
Turn on DOTALL and MULTILINE flags.
2016-05-11 09:13:01 +01:00
Daniel James
3eb7a67899
Extended PCRE syntax.
2016-05-11 09:13:01 +01:00
Daniel James
fe7b6e1d34
Move template code into its own file.
2016-05-11 09:13:01 +01:00