summaryrefslogtreecommitdiff
path: root/jinja2/parser.py
Commit message (Collapse)AuthorAgeFilesLines
* Compile `elif` tag to `elif` instead of `else: if`2.9-maintenanceAdrian Moennich2017-08-221-7/+6
| | | | | | | | This avoids deep nesting in case of many `{% elif .. %}` blocks (which would fail during execution) and also deep recursion (which may fail during compilation) fixes #759
* Implement with-tag with a custom nodeArmin Ronacher2017-01-081-8/+11
|
* Bump up the copyright to 2017Armin Ronacher2017-01-071-1/+1
|
* Move the autoescape extension and with statement to be built-inArmin Ronacher2017-01-071-1/+26
|
* Change grouping behavior of tests. This fixes #401Armin Ronacher2017-01-071-1/+1
|
* Fixed long standing wrong operator precedenceArmin Ronacher2016-12-281-52/+23
|
* Disallow f(x, y=1, z) and similar nonsenseThiefMaster2015-02-061-0/+2
| | | | | | | | | | | | | | | | | | Python rejects such function definitions because it doesn't make much sense to have arguments with no default values after arguments with default values. Jinja did allow them, but handled them improperly (associating the default value with the wrong argument). Due to how broken the current behavior is, it makes more sense to reject templates containing such defintions instead of trying to handle them properly. Both cases are going to break existing code containing such definitions, but besides the fact that possibly no such code exists it is better to fail with a clear error than to silently change the values of arguments. This fixes #364
* Implemented a block set tag.Armin Ronacher2014-06-071-3/+6
|
* Flake 8 fixesArmin Ronacher2014-06-061-9/+8
|
* Since we no longer support 2.5 we can use the builtin next() functionArmin Ronacher2013-05-201-1/+1
|
* six.advance_iterator -> nextArmin Ronacher2013-05-191-50/+49
|
* Remove unused importsDaniel Neuhäuser2013-05-181-1/+1
|
* python 3 port: manual fixes, remove 2to3 from setup.py, remove fixersThomas Waldmann2013-05-181-50/+49
|
* python 3 port: automated changes by a slightly modified python-modernizeThomas Waldmann2013-05-171-0/+2
| | | | (replacing unicode with six.text_type, but not replacing u"" by six.u(""))
* unused codeDmitry Jemerov2011-09-261-1/+0
|
* couple of typos in commentsDmitry Jemerov2011-09-261-1/+1
|
* fixed an operator precedence error introduced in 2.5.2.2.5.3Armin Ronacher2010-10-171-4/+18
| | | | | | Statements like "-foo.bar" had their implicit parentheses applied around the first part of the expression ("(-foo).bar") instead of the more correct "-(foo.bar)".
* fixed an issue with unary operators having the wrong precendence.2.5.1Armin Ronacher2010-08-171-12/+12
| | | | | --HG-- branch : trunk
* Added extension ordering, this fixes #376.Armin Ronacher2010-04-121-1/+1
| | | | | --HG-- branch : trunk
* This fixes #368.Armin Ronacher2010-02-111-9/+14
| | | | | --HG-- branch : trunk
* Further error message improvement, this time for #341.Armin Ronacher2010-02-071-0/+9
| | | | | --HG-- branch : trunk
* implicit tuple expressions can no longer be totally empty.Armin Ronacher2010-02-061-4/+19
| | | | | | | | This change makes ``{% if %}...{% endif %}`` a syntax error now. (#364) --HG-- branch : trunk
* greatly improved error message reporting. This fixes #339Armin Ronacher2010-02-061-36/+105
| | | | | | --HG-- branch : trunk extra : rebase_source : d8f677273490fa73d5603b68478fa3b54f60ccb9
* It's a new yearArmin Ronacher2010-01-221-1/+1
| | | | | --HG-- branch : trunk
* More Python 3 support.Armin Ronacher2009-08-051-47/+48
| | | | | --HG-- branch : trunk
* Added support for optional `scoped` modifier to blocks.Armin Ronacher2009-02-191-0/+1
| | | | | --HG-- branch : trunk
* Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible.Armin Ronacher2009-02-051-1/+1
| | | | | --HG-- branch : trunk
* Priority of `not` raised. It's now possible to write `not foo in bar`Armin Ronacher2009-02-041-6/+8
| | | | | | | | as an alias to `foo not in bar` like in python. Previously the grammar required parentheses (`not (foo in bar)`) which was odd. --HG-- branch : trunk
* This commit makes the parser and lexer use regular string comparison to ↵Ali Afshar2009-01-051-52/+52
| | | | | | | support jython --HG-- branch : trunk
* Copyright switch to "The Jinja Team".Armin Ronacher2009-01-041-1/+1
| | | | | --HG-- branch : trunk
* Include statements can now be marked with ``ignore missing`` to skipArmin Ronacher2008-12-271-0/+6
| | | | | | | non existing templates. --HG-- branch : trunk
* Added support for `Environment.compile_expression`.Armin Ronacher2008-11-021-2/+3
| | | | | --HG-- branch : trunk
* Fixed a bug with the loop context of a for loop if the iterator passed has a ↵Armin Ronacher2008-07-041-2/+4
| | | | | | | volatile `__len__` like the listreverseiterator. `else` in inline if-expressions is optional now. --HG-- branch : trunk
* added support for implicit string literal concatenationArmin Ronacher2008-06-221-1/+9
| | | | | --HG-- branch : trunk
* added support for token stream filtering and preprocessing.Armin Ronacher2008-06-131-2/+1
| | | | | --HG-- branch : trunk
* Fixed a broken unittest and fixed a bug that required multiple tests to be ↵Armin Ronacher2008-06-121-1/+5
| | | | | | | put into parentheses for chaning. --HG-- branch : trunk
* Improved attribute and item lookup by allowing template designers to express ↵Armin Ronacher2008-06-121-6/+10
| | | | | | | the priority. foo.bar checks foo.bar first and then foo['bar'] and the other way round. --HG-- branch : trunk
* some more documentation updates and minor code cleanups. Additionally True ↵Armin Ronacher2008-05-281-3/+4
| | | | | | | and true in the template are the same now, same for false/False and none/None. --HG-- branch : trunk
* fixed a bug in error reporting and some small documentation updatesArmin Ronacher2008-05-261-2/+2
| | | | | --HG-- branch : trunk
* even more tests, fixed severe bug with autoescaping.Armin Ronacher2008-05-251-1/+2
| | | | | --HG-- branch : trunk
* all calls are proxied by context.call now so that we can inject environment ↵Armin Ronacher2008-05-251-0/+1
| | | | | | | and context as first arguments. This slows calls down a bit but is a lot more user friendly. Added first draft of FAQ --HG-- branch : trunk
* variables starting with one or more underscores are not exportedArmin Ronacher2008-05-231-2/+2
| | | | | --HG-- branch : trunk
* removed attribute local aliasing again because that implementation was brokenArmin Ronacher2008-05-161-2/+0
| | | | | --HG-- branch : trunk
* improved exception system. now both name (load name) and filename are passed.Armin Ronacher2008-05-161-24/+24
| | | | | --HG-- branch : trunk
* simplified from importsArmin Ronacher2008-05-151-1/+1
| | | | | --HG-- branch : trunk
* fixed bug with parameter parsingArmin Ronacher2008-05-151-0/+1
| | | | | --HG-- branch : trunk
* switched back to explicit set for assignments. {% foo = 42 %} becomes {% ↵Armin Ronacher2008-05-131-31/+25
| | | | | | | set foo = 42 %} and {% foo.something() }} becomes {{ void(foo.something() }} with this commit. --HG-- branch : trunk
* added parsing code for "for item in seq recursive" and improved parser ↵Armin Ronacher2008-05-111-41/+33
| | | | | | | interface a bit --HG-- branch : trunk
* added support for dotted names in tests and filtersArmin Ronacher2008-05-101-2/+8
| | | | | --HG-- branch : trunk
* added a function to parse assign targes and documented it for the extension ↵Armin Ronacher2008-05-101-51/+45
| | | | | | | interface --HG-- branch : trunk