Fabien Potencier
ac9e4eec15
fixed the ternary operator
2011-01-10 19:07:04 +01:00
Fabien Potencier
e96ed3f66c
bumped version for dev
2011-01-09 09:56:15 +01:00
Fabien Potencier
b5d97e2c18
updated CHANGELOG and bumped version to 1.0.0-RC1
2011-01-09 09:47:02 +01:00
Fabien Potencier
1f7d142351
added callbacks for undefined functions and filters
2011-01-08 15:16:33 +01:00
Fabien Potencier
57d8bf97af
added a way to catch undefined filters (like functions)
2011-01-08 15:13:15 +01:00
Fabien Potencier
6e24ef18db
fixed typo
2011-01-08 14:40:26 +01:00
nikic
7048606421
fix loader doccomments
2011-01-08 14:34:57 +01:00
Fabien Potencier
8da408339b
fixed a notice in a unit test
2011-01-07 17:28:00 +01:00
Martin Hason
05a12f0820
fix line number in error exceptions
2011-01-07 17:27:17 +01:00
Martin Hason
7e53fbc99e
added support for line number in Twig_Template::getAttribute()
2011-01-07 10:22:59 +01:00
Fabien Potencier
4a08303062
fixed typo
2011-01-06 10:18:19 +01:00
Fabien Potencier
03df6d4da7
fixed typo
2011-01-06 08:51:56 +01:00
Fabien Potencier
957a30af75
added context support for functions and filters
2011-01-06 08:40:49 +01:00
Fabien Potencier
57ff88255e
made temporary variable names predictable
2011-01-06 08:37:18 +01:00
Fabien Potencier
7cb9159e85
optimized filter tag implementation
2011-01-06 08:20:09 +01:00
Fabien Potencier
d2d63bd11b
fixed cache option initialization
2011-01-06 08:03:47 +01:00
Fabien Potencier
dbc5bdbd87
changed cache file names so that they are spread over a directory tree
2011-01-05 20:35:38 +01:00
Fabien Potencier
8054b117b7
added some missing phpdoc
2011-01-04 16:52:04 +01:00
Fabien Potencier
0a82da1d74
removed unneeded wrapping nodes added during parsing
2011-01-03 18:35:07 +01:00
Fabien Potencier
266334042e
removed the grammar and simple token parser code (moved to the Twig Extensions repository)
2011-01-03 12:28:11 +01:00
nikic
1602d9bd52
track brackets nesting in lexer
2011-01-03 07:48:09 +01:00
nikic
27f3155330
add Twig_Compiler type hints
2011-01-02 15:10:22 +01:00
nikic
08a056cf31
fix wrong error message
2011-01-02 11:01:33 +01:00
Fabien Potencier
8fee70e3d1
added some missing phpdoc
2010-12-31 16:50:39 +01:00
Fabien Potencier
bd541f618f
fixed optimizer
2010-12-30 21:48:36 +01:00
Leon van der Ree
024b9367eb
improved error messages
2010-12-30 21:23:58 +01:00
Fabien Potencier
2e29145533
fixed ternary operator when used for the default filter
2010-12-30 11:58:28 +01:00
Fabien Potencier
dee2656c9d
changed autoescape first argument from on/off to the standard true/false
2010-12-30 11:20:20 +01:00
Fabien Potencier
0177df4f7c
added the possibility to have tags in the global scope (outside blocks) in a child template
2010-12-30 11:20:20 +01:00
Fabien Potencier
98edcd0cb6
replaced {% display foo %} with {{ block('foo') }}
2010-12-30 11:20:20 +01:00
Fabien Potencier
a958ada7d3
replaced {% parent %} with {{ parent() }}
2010-12-30 11:20:20 +01:00
Fabien Potencier
6302705a1f
removed 'joined by' support for the 'for' tag as a tag should not output something directly
2010-12-30 11:20:19 +01:00
Fabien Potencier
ac7803f9fc
fixed scope for macros (macros can be imported in a block or outside of a block)
...
{% import "macros" as foo %}
{% from "macros" import foo, bar as bar %}
{% block foo %}
{% import "macros" as foofoo %}
{% from "macros" import foo as foofoo, bar as barbar %}
{{ foo('something') }}
{{ bar('something') }}
{{ foofoo('something') }}
{{ barbar('something') }}
{% endblock %}
2010-12-30 09:51:57 +01:00
Fabien Potencier
b0e766f256
fixed typo
2010-12-30 09:31:09 +01:00
Fabien Potencier
5c0d907e08
fixed CS
2010-12-30 09:31:09 +01:00
Arnaud Le Blanc
43ec3036f7
removed Template::callFunction
2010-12-30 09:31:09 +01:00
Arnaud Le Blanc
7794463706
Added sandbox support for functions
2010-12-30 09:31:08 +01:00
Arnaud Le Blanc
3615e9a386
Added auto-escaper support for functions
...
Functions' output is escaped by default and functions can declare
themselves "safe" using the "is_safe" option.
2010-12-30 09:31:08 +01:00
Arnaud Le Blanc
c225a5bed9
Handle functions like filters
...
Functions are not global variables anymore. They are resolved at
compile time, and Twig_Function objects are instanciated only when
compiling.
2010-12-30 09:31:08 +01:00
Arnaud Le Blanc
b247452ec5
Resolve imported functions at compile time
...
{% from %} is compiled as {% import %}, the imported module is placed in
a local variable, and calls to imported functions are compiled as calls
to module functions.
2010-12-30 09:31:08 +01:00
Arnaud Le Blanc
ad6374434d
Added nodes representing local variables
...
Allows to use local PHP variables as temporary variables in compiled
templates
2010-12-30 09:31:08 +01:00
Fabien Potencier
d9e2c42e41
renamed Template::getParentBlock() and getBlock() to diplayParentBlock() and displayBlock(), which is semantically more correct
2010-12-30 09:31:08 +01:00
nikic
6d030c266a
disallow {% set %}{% endset %}
2010-12-22 18:04:45 +01:00
nikic
4ebbc5e43e
rename $parser to $stream in parseArguments
2010-12-22 18:04:34 +01:00
Fabien Potencier
8b74ea04ce
added the possibility to look at more than just the very next token
2010-12-22 11:58:10 +01:00
Fabien Potencier
d72b6ad136
readded TokenStream::look()
2010-12-22 11:51:29 +01:00
nikic
648c843523
TokenStream changes:
...
* remove unused look() and rewind()
* do not shift tokens, but increase a pointer
2010-12-22 11:51:22 +01:00
nikic
d1ae5dbf4c
improve lexer (causes changes in token stream, token and parser)
2010-12-22 11:36:59 +01:00
Fabien Potencier
592834f7f6
fixed typo
2010-12-22 11:34:23 +01:00
nikic
d88a3c805f
remove $is_multitarget return in parseMultitargetExpression
...
Furthermore slightly reordered code thus removing redundant expect()
2010-12-20 19:06:42 +01:00