summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Improved readmeKevin Chabowski2013-10-25
|
* Removed source code documentation. Can be generated at any point.Kevin Chabowski2013-10-25
|
* Merge branch 'parser2'Kevin Chabowski2013-10-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STE gets a new, more robust parser. The previous parser was very fragile and relied on some ugly regular expressions. Other advantages of the new parser: * No precompile phase to implement short tags (?{}, ~{}), that means short tags can now be nested in any order. * The parses now uses the mb_* functions, so it should handle non-ascii text correctly. There were also some improvements to the compiler: * Various small bugfixes. * The compiler accepts and compiles tag parameters that have tags in them. The parser still doesn't accept this (and probably never will), this is mainly used to allow arbitrary code inside of short cmp tags (~{..}). There are now (finally!) tests for the language to maintain a certain quality and consistency (which STE lacked in the past, to be honest). And finally the code was reformatted. Now 1TBS is used instead of Allman.
| * New Testparser2Kevin Chabowski2013-10-25
| |
| * short cmp tags can now contain tags.Kevin Chabowski2013-10-25
| | | | | | | | | | | | | | | | To accomplish this, tag parameters can now be compiled, even if they contain tags (the parser still doesn't allow this, but the compiler can now handle this situation). Also reformatted the code.
| * Fixed some mistakes in mktag subcompilerKevin Chabowski2013-10-25
| | | | | | | | | | | | | | * Undeclared $code variable fixed. * "use ($mandatory_params)" only included, if the $mandatory_params variable will be generated. * Fixed $outputstack not being initialized correctly.
| * Fixed potential bug in VariableNode::transcompileKevin Chabowski2013-10-25
| | | | | | | | Also now PHP doesn't throw notices here.
| * Better handling of newslines and whitespacesKevin Chabowski2013-10-25
| |
| * Made the tests more tolerant for whitespace.Kevin Chabowski2013-10-25
| |
| * Adding default values to some properties.Kevin Chabowski2013-10-23
| | | | | | | | | | | | To reduce the ridiculous amount of notices PHP throws when parsing and executing templates (should really be fixed in the future, this is quite embarassing...).
| * Added some tests.Kevin Chabowski2013-10-23
| | | | | | | | | | | | Many of these break. Mostly because the way whitespace/newlines are added (or not added). This is terribly broken ATM... (It was okay with the old parser, I'll try to replicate that behaviour)
| * Gitignore some tronscompiled templatesKevin Chabowski2013-10-23
| |
| * Merge branch 'parser2' of git@github.com:kch42/Stupid-Template-Engine.git ↵Kevin Chabowski2013-10-23
| |\ | | | | | | | | | into improve-lang
| | * Added some testsKevin Chabowski2013-10-23
| | |
| * | Merge branch 'parser2' into improve-langKevin Chabowski2013-10-21
|/| | | |/ | | | | The new parser will allow some improvements to the language.
| * Removed old parse function and added some documentation.Kevin Chabowski2013-10-21
| |
| * tidyup_ast improvedKevin Chabowski2013-10-20
| |
| * Fixed parse_tag and parse_varKevin Chabowski2013-10-20
| | | | | | | | Now everything seems to work fine. The output code very noisy, though...
| * Added function to tidy up the ASTKevin Chabowski2013-10-20
| |
| * Fixed tag parameter parsingKevin Chabowski2013-10-20
| |
| * Some smaller fixes. Parser seems to work now.Kevin Chabowski2013-10-20
| | | | | | | | | | | | * Parser::next fixed * Parser::search_multi fixes (wrong variable, wrong offset added) * fixed shortifopen and shortcompopen overwriting parser result.
| * Trying to write a better parser. UNTESTED!Kevin Chabowski2013-10-20
|/ | | | | | | | | The previous parser relied on some obscure regular expressions which probably could be tricked. The new parser will also allow a more sane definition of the short tags ?{..|..|..} and ~{..|..|..}. Before these were a terrible hack... All in all the goal of the rewrite is to produce a more robust parser.
* Some minor documentation fixesKevin Chabowski2013-02-03
| | | | Grammar and spelling...
* New docu and fixed mkdocu.shKevin Chabowski2012-10-04
| | | | | mkdocu.sh will now test, if the executable is named "naturaldocs" or "NaturalDocs".
* mute_runtime_errors should now work...Kevin Chabowski2012-10-04
|
* improved <ste:escape> and fixed docu.Kevin Chabowski2012-10-04
| | | | | | | | | * <ste:escape> can now also convert line breaks to <br />, if parameter lines is true. * <ste:escape> now uses PHP's htmlspecialchars instead of htmlentities since it only escapes the minimal neccessary chars which should work, if encoding is handled correctly. * Fixed 2 markup bugs in docu/language_definition.html
* set:array_filter addedKevin Chabowski2012-07-02
|
* Added new Tags to the standard library.Kevin Chabowski2012-06-27
| | | | | | | * ste:in_array checks, if a value is in an array * ste:join joins an array with a glue string * ste:split splits a string with a delimiter to an array * ste:array_add adds an element to an array.
* Fixed STECore::get_var_reference bugs.Kevin Chabowski2012-06-27
| | | | | * It did not return a reference. * Some Tags from the standardlib used references in a wrong way.
* evalbool does not longer yield warnings on non-text inputs.Kevin Chabowski2012-06-06
|
* Fixed broken infloop subcompiler.Kevin Chabowski2012-05-22
|
* Removed a temporary debug output.Kevin Chabowski2012-03-01
|
* Forgot to include the new documentation.Kevin Chabowski2012-02-29
|
* Introduced new exceptions and fixed a parsing bug.Kevin Chabowski2012-02-29
| | | | | | | | | | | | | | * The exceptions RuntimeError, FatalRuntimeError, CantLoadTemplate and CantSaveTemplate were introduced. * RuntimeErrors are automatically catched by the template engine and will be displayed instead of the tag, unless the parameter $mute_runtime_errors was set to true. * Missing tags will result either in a RuntimeError or, if $fatal_error_on_missing_tag is true, in a FatalRuntimeError. * The mktag-subcompiler and the standard library functions now use the new exceptions. * A bug, that threw away leading TextNodes if a comment or rawtext pseudotag was parsed, is now fixed.
* Fixed some error message bugs.Kevin Chabowski2012-02-21
| | | | | | * Very often the error offsets of parsing errors were too high. * The offset to line translation now works cleaner and should no longer throw PHP errors.
* Added builtin ste:get and fixed a code generation bug.Kevin Chabowski2012-01-15
| | | | | | | | * ste:get allows us to get a variable's content dynamically. * (') was escaped for TextNodes, which resulted to: \' should have been: '
* Win/Mac newlines are now treated correctly at beginning of a TextNode.Kevin Chabowski2012-01-08
|
* ste:comment and ste:rawtext are now handled much cleaner.Kevin Chabowski2012-01-08
|
* Yet another documentation fix...Kevin Chabowski2012-01-08
| | | | Copy&Paste is sometimes a very bad idea...
* Message of a ParseCompileError fixed.Kevin Chabowski2012-01-06
| | | | The template name was not included.
* Replaced the <![CDATA[ ... ]]> in the docu. Didn't work...Kevin Chabowski2012-01-05
|
* Fixed a bug regarding tag parameter creation.Kevin Chabowski2011-11-21
| | | | | If a tag parameter was empty, no string was created during trancompilation. Resulted in a PHP parsing error.
* Merge branch 'master' of git@github.com:kch42/Stupid-Template-Engine.gitKevin Chabowski2011-11-16
|\
| * Fixed documentation (again -.-)Kevin Chabowski2011-11-16
| |
* | Fixed documentation (again -.-)Kevin Chabowski2011-11-16
|/
* Fixed documentationKevin Chabowski2011-11-16
|
* Foreach counter bug fixed.Kevin Chabowski2011-11-12
| | | | The current counter value was not set prorperly.
* Better error messages and a bugfix.Kevin Chabowski2011-11-10
| | | | | | | | | * If there are unbalanced open/close Tags in the template, STE will now tell you exactly which Tag was not closed properly (before: the first opening tag during the current balaning check). * It was not possible to access array fields dynamically, e.g. this: $foo[$bar] was not possible before. Now fixed.
* Fixed *very* stupid bug in ste:for subcompiler.Kevin Chabowski2011-09-29
| | | | | | | The result of this bug: every for-loop, where the step parameter could be evaluated at compile time (i.e. only text) had step = 1. Should have seen this in the example pages...
* ste:date now uses strftimeKevin Chabowski2011-09-29
| | | | | | | Because strftime is more flexible: You can... * ...put arbitrary text inside the format * ...manipulate it by set the locale (i.e. set language-specific month names etc.)