├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── phpunit.xml.dist ├── src └── Flow │ ├── Adapter.php │ ├── Adapter │ └── FileAdapter.php │ ├── Compiler.php │ ├── Expression.php │ ├── Expression │ ├── AddExpression.php │ ├── AndExpression.php │ ├── ArrayExpression.php │ ├── AttributeExpression.php │ ├── BinaryExpression.php │ ├── CompareExpression.php │ ├── ConcatExpression.php │ ├── ConditionalExpression.php │ ├── ConstantExpression.php │ ├── DivExpression.php │ ├── FilterExpression.php │ ├── FunctionCallExpression.php │ ├── InclusionExpression.php │ ├── JoinExpression.php │ ├── LogicalExpression.php │ ├── ModExpression.php │ ├── MulExpression.php │ ├── NameExpression.php │ ├── NegExpression.php │ ├── NotExpression.php │ ├── OrExpression.php │ ├── PosExpression.php │ ├── StringExpression.php │ ├── SubExpression.php │ ├── UnaryExpression.php │ └── XorExpression.php │ ├── Helper.php │ ├── Helper │ ├── ContextIterator.php │ ├── Cycler.php │ └── RangeIterator.php │ ├── Lexer.php │ ├── Loader.php │ ├── Module.php │ ├── Node.php │ ├── Node │ ├── AssignNode.php │ ├── BlockDisplayNode.php │ ├── BlockNode.php │ ├── BreakNode.php │ ├── CallNode.php │ ├── ContinueNode.php │ ├── ExtendsNode.php │ ├── ForNode.php │ ├── IfNode.php │ ├── ImportNode.php │ ├── IncludeNode.php │ ├── MacroNode.php │ ├── OutputNode.php │ ├── ParentNode.php │ ├── RawNode.php │ ├── TextNode.php │ └── YieldNode.php │ ├── NodeList.php │ ├── Parser.php │ ├── SyntaxError.php │ ├── Template.php │ ├── Token.php │ └── TokenStream.php └── tests ├── Flow ├── HelperTest.php └── LexerTest.php ├── OutputTest.php ├── actual ├── add.html ├── and.html ├── array.html ├── assign.html ├── block.html ├── comparison.html ├── concat.html ├── conditional.html ├── div.html ├── for.html ├── if.html ├── in.html ├── include.html ├── includes │ ├── absolute.html │ ├── partial.html │ ├── partial │ │ └── template.html │ └── relative.html ├── join.html ├── layouts │ └── base.html ├── logical.html ├── macro.html ├── macro_with.html ├── mul.html ├── or.html ├── output.html ├── partial │ └── template.html ├── sub.html ├── unless.html └── xor.html ├── bootstrap.php ├── output ├── add.html ├── and.html ├── array.html ├── assign.html ├── block.html ├── comparison.html ├── concat.html ├── conditional.html ├── div.html ├── for.html ├── if.html ├── in.html ├── include.html ├── join.html ├── logical.html ├── macro.html ├── macro_with.html ├── mul.html ├── or.html ├── output.html ├── sub.html ├── unless.html └── xor.html └── tokens ├── add.php ├── and.php ├── array.php ├── assign.php ├── block.php ├── comparison.php ├── concat.php ├── conditional.php ├── div.php ├── for.php ├── if.php ├── in.php ├── include.php ├── join.php ├── logical.php ├── macro.php ├── macro_with.php ├── mul.php ├── or.php ├── output.php ├── sub.php ├── unless.php └── xor.php /.gitignore: -------------------------------------------------------------------------------- 1 | /tests/cache/ 2 | /vendor/ 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/README.md -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/composer.json -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/phpunit.xml.dist -------------------------------------------------------------------------------- /src/Flow/Adapter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/src/Flow/Adapter.php -------------------------------------------------------------------------------- /src/Flow/Adapter/FileAdapter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/src/Flow/Adapter/FileAdapter.php -------------------------------------------------------------------------------- /src/Flow/Compiler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/src/Flow/Compiler.php -------------------------------------------------------------------------------- /src/Flow/Expression.php: -------------------------------------------------------------------------------- 1 | block.html 3 | 4 | -------------------------------------------------------------------------------- /tests/output/comparison.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/comparison.html -------------------------------------------------------------------------------- /tests/output/concat.html: -------------------------------------------------------------------------------- 1 | foobar 2 | -------------------------------------------------------------------------------- /tests/output/conditional.html: -------------------------------------------------------------------------------- 1 | yes 2 | no 3 | yes 4 | -------------------------------------------------------------------------------- /tests/output/div.html: -------------------------------------------------------------------------------- 1 | 0.5 2 | 1 3 | 0 4 | 0.25 5 | 4 6 | 500 7 | 1 8 | -5 9 | -2 10 | -------------------------------------------------------------------------------- /tests/output/for.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/for.html -------------------------------------------------------------------------------- /tests/output/if.html: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | this will be printed 6 | 7 | -------------------------------------------------------------------------------- /tests/output/in.html: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 4 | -------------------------------------------------------------------------------- /tests/output/include.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/include.html -------------------------------------------------------------------------------- /tests/output/join.html: -------------------------------------------------------------------------------- 1 | foo bar 2 | hello world 3 | -------------------------------------------------------------------------------- /tests/output/logical.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/logical.html -------------------------------------------------------------------------------- /tests/output/macro.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/macro.html -------------------------------------------------------------------------------- /tests/output/macro_with.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/macro_with.html -------------------------------------------------------------------------------- /tests/output/mul.html: -------------------------------------------------------------------------------- 1 | 2 2 | 2 3 | 0 4 | 2000 5 | 1 6 | -------------------------------------------------------------------------------- /tests/output/or.html: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /tests/output/output.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/output/output.html -------------------------------------------------------------------------------- /tests/output/sub.html: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | -1 4 | -2 5 | 1 6 | 0 7 | 0 8 | -------------------------------------------------------------------------------- /tests/output/unless.html: -------------------------------------------------------------------------------- 1 | this will be printed 2 | 3 | -------------------------------------------------------------------------------- /tests/output/xor.html: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /tests/tokens/add.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/add.php -------------------------------------------------------------------------------- /tests/tokens/and.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/and.php -------------------------------------------------------------------------------- /tests/tokens/array.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/array.php -------------------------------------------------------------------------------- /tests/tokens/assign.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/assign.php -------------------------------------------------------------------------------- /tests/tokens/block.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/block.php -------------------------------------------------------------------------------- /tests/tokens/comparison.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/comparison.php -------------------------------------------------------------------------------- /tests/tokens/concat.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/concat.php -------------------------------------------------------------------------------- /tests/tokens/conditional.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/conditional.php -------------------------------------------------------------------------------- /tests/tokens/div.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/div.php -------------------------------------------------------------------------------- /tests/tokens/for.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/for.php -------------------------------------------------------------------------------- /tests/tokens/if.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/if.php -------------------------------------------------------------------------------- /tests/tokens/in.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/in.php -------------------------------------------------------------------------------- /tests/tokens/include.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/include.php -------------------------------------------------------------------------------- /tests/tokens/join.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/join.php -------------------------------------------------------------------------------- /tests/tokens/logical.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/logical.php -------------------------------------------------------------------------------- /tests/tokens/macro.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/macro.php -------------------------------------------------------------------------------- /tests/tokens/macro_with.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/macro_with.php -------------------------------------------------------------------------------- /tests/tokens/mul.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/mul.php -------------------------------------------------------------------------------- /tests/tokens/or.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/or.php -------------------------------------------------------------------------------- /tests/tokens/output.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/output.php -------------------------------------------------------------------------------- /tests/tokens/sub.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/sub.php -------------------------------------------------------------------------------- /tests/tokens/unless.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/unless.php -------------------------------------------------------------------------------- /tests/tokens/xor.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nramenta/flow/HEAD/tests/tokens/xor.php --------------------------------------------------------------------------------