| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
* Undeclared $code variable fixed.
* "use ($mandatory_params)" only included, if the $mandatory_params
variable will be generated.
* Fixed $outputstack not being initialized correctly.
|
| |
| |
| |
| | |
Also now PHP doesn't throw notices here.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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...).
|
| |
| |
| |
| |
| |
| | |
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)
|
| | |
|
| |\
| | |
| | |
| | | |
into improve-lang
|
| | | |
|
|/| |
| |/
| |
| | |
The new parser will allow some improvements to the language.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Now everything seems to work fine. The output code very noisy, though...
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* Parser::next fixed
* Parser::search_multi fixes (wrong variable, wrong offset added)
* fixed shortifopen and shortcompopen overwriting parser result.
|
|/
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Grammar and spelling...
|
|
|
|
|
| |
mkdocu.sh will now test, if the executable is named "naturaldocs" or
"NaturalDocs".
|
| |
|
|
|
|
|
|
|
|
|
| |
* <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
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* It did not return a reference.
* Some Tags from the standardlib used references in a wrong way.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* ste:get allows us to get a variable's content dynamically.
* (') was escaped for TextNodes, which resulted to:
\'
should have been:
'
|
| |
|
| |
|
|
|
|
| |
Copy&Paste is sometimes a very bad idea...
|
|
|
|
| |
The template name was not included.
|
| |
|
|
|
|
|
| |
If a tag parameter was empty, no string was created during
trancompilation. Resulted in a PHP parsing error.
|
|\ |
|
| | |
|
|/ |
|
| |
|