| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
| |
Previously ] was duplicated in the ouput
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This switches the code documentation genarator (we're now using phpdoc
instead of NaturalDoc).
Also various small code cleanup tasks:
- Remove unused code
- Get rid of `and` / `or`, we're using `&&` / `||` now
- Adding missing return values
- Helping PhpStorm to detect some dynamically called functions
(mark_builtin_callable in Transcompiler)
- Reword transcompiling => compiling in documentation
|
| |
|
| |
|
| |
|
|
|
|
| |
Also add git hooks that checks formatting
|
|
|
|
| |
PHPs type juggling strikes again :(
|
|
|
|
|
|
| |
- Expand tabs into spaces
- Remove trailing whitespace
- Get rid of closing `?>` tags
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This weird error came from an automated search&replace to add NaturalDocs
comments...
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ste:mktag generated tags now have an own scope. They even resemble
closures, since they inherit their parent scope.
A lot of work was done to keep this compatible with older programs.
However:
* Templates that relied on the non-scoping behavior of tags will probably
fail.
* Since $ste->vars is no longer an actual array, things like
$ste->vars["foo"]["bar"] = "baz"
are no longer possible! A single field access will still work:
$ste->vars["foo"] = "bar"
|
|
|
|
|
|
| |
Didn't work at all before. The varname was not passed correctly.
Also added the test case that showed this.
|
|
|
|
|
| |
If a variable was the very last thing in a template, the last charater of
the variable was duplicated as a text node.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We should be able to use a PSR4 autoloader (like composer's) now. ste.php
is still there as a fallback for old applications.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | | |
|