├── .gitignore
├── INSTALL.rst
├── README.rst
├── TODO.rst
├── TOKENS.rst
├── USAGE.rst
├── bin
├── snow-compile
├── snow-watch-mac
└── test-single
├── docs
└── documentation.txt
├── libs
├── PHP-Parser
│ ├── .travis.yml
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── composer.json
│ ├── doc
│ │ ├── 0_Introduction.markdown
│ │ ├── 1_Usage_of_basic_components.markdown
│ │ ├── 2_Other_node_tree_representations.markdown
│ │ └── 3_Code_generation.markdown
│ ├── grammar
│ │ ├── README.md
│ │ ├── analyze.php
│ │ ├── kmyacc.php.parser
│ │ ├── rebuildParser.php
│ │ └── zend_language_parser.phpy
│ ├── lib
│ │ ├── PHPParser
│ │ │ ├── Autoloader.php
│ │ │ ├── Builder.php
│ │ │ ├── Builder
│ │ │ │ ├── Class.php
│ │ │ │ ├── Function.php
│ │ │ │ ├── Method.php
│ │ │ │ ├── Param.php
│ │ │ │ └── Property.php
│ │ │ ├── BuilderAbstract.php
│ │ │ ├── BuilderFactory.php
│ │ │ ├── Error.php
│ │ │ ├── Lexer.php
│ │ │ ├── Lexer
│ │ │ │ └── Emulative.php
│ │ │ ├── Node.php
│ │ │ ├── Node
│ │ │ │ ├── Arg.php
│ │ │ │ ├── Const.php
│ │ │ │ ├── Expr.php
│ │ │ │ ├── Expr
│ │ │ │ │ ├── Array.php
│ │ │ │ │ ├── ArrayDimFetch.php
│ │ │ │ │ ├── ArrayItem.php
│ │ │ │ │ ├── Assign.php
│ │ │ │ │ ├── AssignBitwiseAnd.php
│ │ │ │ │ ├── AssignBitwiseOr.php
│ │ │ │ │ ├── AssignBitwiseXor.php
│ │ │ │ │ ├── AssignClassProperty.php
│ │ │ │ │ ├── AssignConcat.php
│ │ │ │ │ ├── AssignDiv.php
│ │ │ │ │ ├── AssignList.php
│ │ │ │ │ ├── AssignMinus.php
│ │ │ │ │ ├── AssignMod.php
│ │ │ │ │ ├── AssignMul.php
│ │ │ │ │ ├── AssignPlus.php
│ │ │ │ │ ├── AssignRef.php
│ │ │ │ │ ├── AssignShiftLeft.php
│ │ │ │ │ ├── AssignShiftRight.php
│ │ │ │ │ ├── BitwiseAnd.php
│ │ │ │ │ ├── BitwiseNot.php
│ │ │ │ │ ├── BitwiseOr.php
│ │ │ │ │ ├── BitwiseXor.php
│ │ │ │ │ ├── BooleanAnd.php
│ │ │ │ │ ├── BooleanNot.php
│ │ │ │ │ ├── BooleanOr.php
│ │ │ │ │ ├── Cast.php
│ │ │ │ │ ├── Cast
│ │ │ │ │ │ ├── Array.php
│ │ │ │ │ │ ├── Bool.php
│ │ │ │ │ │ ├── Double.php
│ │ │ │ │ │ ├── Int.php
│ │ │ │ │ │ ├── Object.php
│ │ │ │ │ │ ├── String.php
│ │ │ │ │ │ └── Unset.php
│ │ │ │ │ ├── ClassConstFetch.php
│ │ │ │ │ ├── Clone.php
│ │ │ │ │ ├── Closure.php
│ │ │ │ │ ├── ClosureUse.php
│ │ │ │ │ ├── Concat.php
│ │ │ │ │ ├── ConstFetch.php
│ │ │ │ │ ├── Div.php
│ │ │ │ │ ├── Empty.php
│ │ │ │ │ ├── Equal.php
│ │ │ │ │ ├── ErrorSuppress.php
│ │ │ │ │ ├── Eval.php
│ │ │ │ │ ├── Exit.php
│ │ │ │ │ ├── FuncCall.php
│ │ │ │ │ ├── Greater.php
│ │ │ │ │ ├── GreaterOrEqual.php
│ │ │ │ │ ├── Identical.php
│ │ │ │ │ ├── Include.php
│ │ │ │ │ ├── Instanceof.php
│ │ │ │ │ ├── Isset.php
│ │ │ │ │ ├── LogicalAnd.php
│ │ │ │ │ ├── LogicalOr.php
│ │ │ │ │ ├── LogicalXor.php
│ │ │ │ │ ├── MethodCall.php
│ │ │ │ │ ├── Minus.php
│ │ │ │ │ ├── Mod.php
│ │ │ │ │ ├── Mul.php
│ │ │ │ │ ├── New.php
│ │ │ │ │ ├── NotEqual.php
│ │ │ │ │ ├── NotIdentical.php
│ │ │ │ │ ├── Plus.php
│ │ │ │ │ ├── PostDec.php
│ │ │ │ │ ├── PostInc.php
│ │ │ │ │ ├── PreDec.php
│ │ │ │ │ ├── PreInc.php
│ │ │ │ │ ├── Print.php
│ │ │ │ │ ├── PropertyFetch.php
│ │ │ │ │ ├── ShellExec.php
│ │ │ │ │ ├── ShiftLeft.php
│ │ │ │ │ ├── ShiftRight.php
│ │ │ │ │ ├── Smaller.php
│ │ │ │ │ ├── SmallerOrEqual.php
│ │ │ │ │ ├── StaticCall.php
│ │ │ │ │ ├── StaticPropertyFetch.php
│ │ │ │ │ ├── Ternary.php
│ │ │ │ │ ├── UnaryMinus.php
│ │ │ │ │ ├── UnaryPlus.php
│ │ │ │ │ └── Variable.php
│ │ │ │ ├── Name.php
│ │ │ │ ├── Name
│ │ │ │ │ ├── FullyQualified.php
│ │ │ │ │ └── Relative.php
│ │ │ │ ├── Param.php
│ │ │ │ ├── Scalar.php
│ │ │ │ ├── Scalar
│ │ │ │ │ ├── ClassConst.php
│ │ │ │ │ ├── DNumber.php
│ │ │ │ │ ├── DirConst.php
│ │ │ │ │ ├── Encapsed.php
│ │ │ │ │ ├── FileConst.php
│ │ │ │ │ ├── FuncConst.php
│ │ │ │ │ ├── LNumber.php
│ │ │ │ │ ├── LineConst.php
│ │ │ │ │ ├── MethodConst.php
│ │ │ │ │ ├── NSConst.php
│ │ │ │ │ ├── String.php
│ │ │ │ │ └── TraitConst.php
│ │ │ │ ├── Stmt.php
│ │ │ │ └── Stmt
│ │ │ │ │ ├── Break.php
│ │ │ │ │ ├── Case.php
│ │ │ │ │ ├── Catch.php
│ │ │ │ │ ├── Class.php
│ │ │ │ │ ├── ClassConst.php
│ │ │ │ │ ├── ClassMethod.php
│ │ │ │ │ ├── Const.php
│ │ │ │ │ ├── Continue.php
│ │ │ │ │ ├── Declare.php
│ │ │ │ │ ├── DeclareDeclare.php
│ │ │ │ │ ├── Do.php
│ │ │ │ │ ├── Echo.php
│ │ │ │ │ ├── Else.php
│ │ │ │ │ ├── ElseIf.php
│ │ │ │ │ ├── For.php
│ │ │ │ │ ├── ForNumeric.php
│ │ │ │ │ ├── Foreach.php
│ │ │ │ │ ├── Function.php
│ │ │ │ │ ├── Global.php
│ │ │ │ │ ├── Goto.php
│ │ │ │ │ ├── HaltCompiler.php
│ │ │ │ │ ├── If.php
│ │ │ │ │ ├── Import.php
│ │ │ │ │ ├── ImportPath.php
│ │ │ │ │ ├── Imports.php
│ │ │ │ │ ├── InlineHTML.php
│ │ │ │ │ ├── Interface.php
│ │ │ │ │ ├── Label.php
│ │ │ │ │ ├── Namespace.php
│ │ │ │ │ ├── Property.php
│ │ │ │ │ ├── PropertyDeclarations.php
│ │ │ │ │ ├── PropertyProperty.php
│ │ │ │ │ ├── Return.php
│ │ │ │ │ ├── Static.php
│ │ │ │ │ ├── StaticVar.php
│ │ │ │ │ ├── Switch.php
│ │ │ │ │ ├── Throw.php
│ │ │ │ │ ├── Trait.php
│ │ │ │ │ ├── TraitUse.php
│ │ │ │ │ ├── TraitUseAdaptation.php
│ │ │ │ │ ├── TraitUseAdaptation
│ │ │ │ │ ├── Alias.php
│ │ │ │ │ └── Precedence.php
│ │ │ │ │ ├── TryCatch.php
│ │ │ │ │ ├── Unset.php
│ │ │ │ │ ├── Use.php
│ │ │ │ │ ├── UseUse.php
│ │ │ │ │ └── While.php
│ │ │ ├── NodeAbstract.php
│ │ │ ├── NodeDumper.php
│ │ │ ├── NodeTraverser.php
│ │ │ ├── NodeVisitor.php
│ │ │ ├── NodeVisitor
│ │ │ │ └── NameResolver.php
│ │ │ ├── NodeVisitorAbstract.php
│ │ │ ├── Parser.php
│ │ │ ├── PrettyPrinter
│ │ │ │ └── Zend.php
│ │ │ ├── PrettyPrinterAbstract.php
│ │ │ ├── Serializer.php
│ │ │ ├── Serializer
│ │ │ │ └── XML.php
│ │ │ ├── Template.php
│ │ │ ├── TemplateLoader.php
│ │ │ ├── Unserializer.php
│ │ │ └── Unserializer
│ │ │ │ └── XML.php
│ │ └── bootstrap.php
│ ├── phpunit.xml.dist
│ ├── test
│ │ ├── PHPParser
│ │ │ └── Tests
│ │ │ │ ├── Builder
│ │ │ │ ├── ClassTest.php
│ │ │ │ ├── FunctionTest.php
│ │ │ │ ├── MethodTest.php
│ │ │ │ ├── ParamTest.php
│ │ │ │ └── PropertyTest.php
│ │ │ │ ├── BuilderFactoryTest.php
│ │ │ │ ├── ErrorTest.php
│ │ │ │ ├── Lexer
│ │ │ │ └── EmulativeTest.php
│ │ │ │ ├── LexerTest.php
│ │ │ │ ├── Node
│ │ │ │ ├── NameTest.php
│ │ │ │ └── Scalar
│ │ │ │ │ └── StringTest.php
│ │ │ │ ├── NodeAbstractTest.php
│ │ │ │ ├── NodeDumperTest.php
│ │ │ │ ├── NodeTraverserTest.php
│ │ │ │ ├── NodeVisitor
│ │ │ │ └── NameResolverTest.php
│ │ │ │ ├── Serializer
│ │ │ │ └── XMLTest.php
│ │ │ │ ├── TemplateLoaderTest.php
│ │ │ │ ├── TemplateTest.php
│ │ │ │ ├── Unserializer
│ │ │ │ └── XMLTest.php
│ │ │ │ └── codeTest.php
│ │ └── code
│ │ │ ├── expr
│ │ │ ├── arrayDef.test
│ │ │ ├── assign.test
│ │ │ ├── cast.test
│ │ │ ├── clone.test
│ │ │ ├── closure.test
│ │ │ ├── comparison.test
│ │ │ ├── errorSuppress.test
│ │ │ ├── exit.test
│ │ │ ├── fetchAndCall
│ │ │ │ ├── args.test
│ │ │ │ ├── constFetch.test
│ │ │ │ ├── funcCall.test
│ │ │ │ ├── newDeref.test
│ │ │ │ ├── objectAccess.test
│ │ │ │ ├── simpleArrayAccess.test
│ │ │ │ ├── staticCall.test
│ │ │ │ └── staticPropertyFetch.test
│ │ │ ├── includeAndEval.test
│ │ │ ├── issetAndEmpty.test
│ │ │ ├── logic.test
│ │ │ ├── math.test
│ │ │ ├── new.test
│ │ │ ├── print.test
│ │ │ ├── shellExec.test
│ │ │ ├── ternary.test
│ │ │ └── variable.test
│ │ │ ├── scalar
│ │ │ ├── constantString.test
│ │ │ ├── docString.test
│ │ │ ├── encapsedString.test
│ │ │ ├── float.test
│ │ │ ├── int.test
│ │ │ └── magicConst.test
│ │ │ └── stmt
│ │ │ ├── blocklessStatement.test
│ │ │ ├── class
│ │ │ ├── abstract.test
│ │ │ ├── conditional.test
│ │ │ ├── final.test
│ │ │ ├── interface.test
│ │ │ ├── modifier.test-fail
│ │ │ ├── name.test-fail
│ │ │ ├── php4Style.test
│ │ │ ├── simple.test
│ │ │ ├── staticMethod.test-fail
│ │ │ └── trait.test
│ │ │ ├── const.test
│ │ │ ├── controlFlow.test
│ │ │ ├── declare.test
│ │ │ ├── echo.test
│ │ │ ├── function
│ │ │ ├── byRef.test
│ │ │ ├── conditional.test
│ │ │ ├── defaultValues.test
│ │ │ ├── specialVars.test
│ │ │ └── typeHints.test
│ │ │ ├── haltCompiler.test
│ │ │ ├── haltCompilerInvalidSyntax.test-fail
│ │ │ ├── haltCompilerOutermostScope.test-fail
│ │ │ ├── if.test
│ │ │ ├── inlineHTML.test
│ │ │ ├── loop
│ │ │ ├── do.test
│ │ │ ├── for.test
│ │ │ ├── foreach.test
│ │ │ └── while.test
│ │ │ ├── namespace
│ │ │ ├── alias.test
│ │ │ ├── braced.test
│ │ │ ├── mix.test-fail
│ │ │ ├── name.test
│ │ │ ├── name.test-fail
│ │ │ ├── nested.test-fail
│ │ │ ├── notBraced.test
│ │ │ ├── outsideStmt.test
│ │ │ └── outsideStmt.test-fail
│ │ │ ├── switch.test
│ │ │ ├── tryCatch.test
│ │ │ └── unset.test
│ └── test_old
│ │ └── run.php
└── README
├── reference-grammars
├── PHP
│ ├── zend_language_parser.y
│ └── zend_language_scanner.l
├── phc
│ ├── ast.tea
│ ├── php_parser.ypp
│ └── php_scanner.lex
├── phply
│ ├── __init__.py
│ ├── phpast.py
│ ├── phplex.py
│ ├── phpparse.py
│ └── pythonast.py
└── python4ply-1.0
│ ├── LICENSE
│ ├── README
│ ├── compile.py
│ ├── compiler_patches.py
│ ├── grammar_to_ply.py
│ ├── python_grammar.py
│ ├── python_lex.py
│ ├── python_tokens.py
│ ├── python_yacc.py
│ ├── sample.py
│ ├── tutorial.html
│ └── validate.py
├── requirements.txt
├── scripts
└── convert_tests.php
├── src
├── php
│ ├── Snowscript
│ │ ├── Autoloader.php
│ │ ├── Lexer.php
│ │ ├── Lexer.snow
│ │ ├── Node
│ │ │ ├── Expr
│ │ │ │ ├── Dict.php
│ │ │ │ ├── DictItem.php
│ │ │ │ ├── ExistenceIsset.php
│ │ │ │ ├── ExistenceNotEmpty.php
│ │ │ │ └── Receiver.php
│ │ │ └── Stmt
│ │ │ │ ├── Extends.php
│ │ │ │ └── Implements.php
│ │ ├── Visitors.php
│ │ ├── Visitors.snow
│ │ ├── __project.snow
│ │ └── snowscript.php
│ └── bootstrap.php
└── python
│ ├── __init__.py
│ └── snow
│ ├── __init__.py
│ └── lexer
│ ├── __init__.py
│ ├── error.py
│ ├── lex-to-json.py
│ ├── lex_to_html.py
│ ├── lexer.py
│ ├── prettyprint.py
│ ├── testrunner.py
│ ├── tests
│ ├── 0000.basics.test
│ ├── 0001_strings.test
│ ├── 0002_indentation.test
│ ├── 0003_comments.test
│ ├── 0004_control_structures.test
│ ├── 0005_inline_html.test
│ ├── 0006_globals.test
│ ├── 0007_variable_variable.test
│ ├── 0008_name_conversion.test
│ ├── 0009_missing_parenthesis.test
│ └── 0010_switch.test
│ ├── tokens.py
│ └── transformations.py
├── stdlib
├── bootstrap.php
├── data_structures.php
└── data_structures.snow
├── tests-failing
├── expr
│ ├── closure.phpt
│ └── fetchAndCall
│ │ ├── args.phpt
│ │ ├── constFetch.phpt
│ │ ├── funcCall.phpt
│ │ ├── newDeref.php
│ │ ├── newDeref.phpt
│ │ ├── objectAccess.phpt
│ │ ├── simpleArrayAccess.phpt
│ │ ├── staticCall.phpt
│ │ └── staticPropertyFetch.phpt
├── scope
│ └── inner_functions.phpt
└── stmt
│ ├── class
│ └── trait.phpt
│ └── namespace
│ ├── alias.phpt
│ ├── braced.phpt
│ ├── name.phpt
│ ├── notBraced.phpt
│ └── outsideStmt.phpt
└── tests
├── README.rst
├── bootstrap_tests.php
├── bugs
└── 15_mod_keyword_error.phpt
├── expr
├── arrayDef.phpt
├── assign.phpt
├── cast.phpt
├── clone.phpt
├── comment.phpt
├── comparison.phpt
├── dict.phpt
├── existence.phpt
├── exit.phpt
├── hello_world.phpt
├── includeAndEval.phpt
├── issetAndEmpty.phpt
├── list.phpt
├── logic.phpt
├── math.phpt
├── names.phpt
├── new.phpt
├── print.phpt
├── receivers.phpt
├── strings.phpt
├── strings_advanced.phpt
└── strings_whitespace.phpt
├── full
└── 99-bottles.phpt
├── scalar
├── float.phpt
├── int.phpt
└── magicConst.phpt
├── scope
├── basic.phpt
├── namespaces.phpt
├── project.phpt
└── project
│ ├── __project.snow
│ ├── a_path
│ └── afile.snow
│ └── test.snow
└── stmt
├── class
├── access.phpt
├── interface.phpt
└── simple.phpt
├── const.phpt
├── controlFlow.phpt
├── echo.phpt
├── function
├── byRef.phpt
├── conditional.phpt
├── defaultValues.phpt
├── specialVars.phpt
└── typeHints.phpt
├── haltCompiler.phpt
├── if.phpt
├── loop
├── foreach.phpt
└── while.phpt
├── namespace
├── mix.test-fail
├── name.test-fail
├── nested.test-fail
└── outsideStmt.test-fail
├── switch.phpt
├── ternary.phpt
├── tryCatch.phpt
└── unset.phpt
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | run-tests.log
3 | *.diff
4 | *.out
5 | *.exp
6 | *.log
7 | tests/*.php
8 | tests/*/*.php
9 | tests/*/*/*.php
10 | y.output
11 | libs/PHP-Parser/lib/PHPParser/Parser/
12 | libs/kmyacc-forked
13 |
--------------------------------------------------------------------------------
/INSTALL.rst:
--------------------------------------------------------------------------------
1 | To install on ubuntu you need::
2 |
3 | apt-get install php5-cli php-pear
4 |
5 | For all systems you need some python packages too::
6 |
7 | pip install -r requirements.txt
8 |
--------------------------------------------------------------------------------
/TODO.rst:
--------------------------------------------------------------------------------
1 | TODO
2 | ====
3 |
4 | - Long block comment inside a class breaks
5 | - Remove isset keyword + others
--------------------------------------------------------------------------------
/USAGE.rst:
--------------------------------------------------------------------------------
1 | Using Snowscript
2 | ++++++++++++++++
3 |
4 | Stub.
5 |
6 | The following tools exists in the "bin" folder::
7 |
8 | snow-compile /abs/path/to/file.snow
9 |
10 | - Outputs the compiled php code to stdout
11 |
12 | snow-watch-mac /abs/path/to/dir1 /abs/path/to/dir2 ...
13 |
14 | - Watches for changes to ".snow" files in given directories and
15 | - recompiles ".php" files with the same name and path.
--------------------------------------------------------------------------------
/bin/snow-compile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | setAttribute('name', 'value')` and to retrieve them using
12 | `$node->getAttribute('name' [, 'default'])`. Additionally the existance of an attribute can be checked with
13 | `$node->hasAttribute('name')` and all attributes can be returned using `$node->getAttributes()`.
14 |
15 | * Add code generation features: Builders and templates.
16 |
17 | For more infos, see the [code generation documentation][1].
18 |
19 | * [BC] Don't traverse nodes merged by another visitor:
20 |
21 | If a NodeVisitor returns an array of nodes to merge, these will no longer be traversed by all other visitors. This
22 | behavior only caused problems.
23 |
24 | * Fix line numbers for some list structures
25 | * Fix XML unserialization of empty nodes
26 | * Fix parsing of integers that overflow into floats
27 | * Fix emulation of NOWDOC and binary floats
28 |
29 | Version 0.9.0 (05.01.2012)
30 | --------------------------
31 |
32 | First version.
33 |
34 | [1]: https://github.com/nikic/PHP-Parser/blob/master/doc/3_Code_generation.markdown
--------------------------------------------------------------------------------
/libs/PHP-Parser/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nikic/php-parser",
3 | "description": "A PHP parser written in PHP",
4 | "keywords": ["php", "parser"],
5 | "type": "library",
6 | "license": "BSD",
7 | "authors": [
8 | {
9 | "name": "Nikita Popov"
10 | }
11 | ],
12 | "require": {
13 | "php": ">=5.2"
14 | },
15 | "autoload": {
16 | "psr-0": { "PHPParser": "lib/" }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Autoloader.php:
--------------------------------------------------------------------------------
1 | $value,
21 | 'byRef' => $byRef
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Const.php:
--------------------------------------------------------------------------------
1 | $name,
21 | 'value' => $value,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr.php:
--------------------------------------------------------------------------------
1 | $items
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ArrayDimFetch.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'dim' => $dim
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ArrayItem.php:
--------------------------------------------------------------------------------
1 | $key,
23 | 'value' => $value,
24 | 'byRef' => $byRef
25 | ),
26 | $line, $docComment
27 | );
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Assign.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignBitwiseAnd.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignBitwiseOr.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignBitwiseXor.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignClassProperty.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignConcat.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignDiv.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignMinus.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignMod.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignMul.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignPlus.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignRef.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignShiftLeft.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/AssignShiftRight.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'expr' => $expr
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BitwiseAnd.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BitwiseNot.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BitwiseOr.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BitwiseXor.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BooleanAnd.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BooleanNot.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/BooleanOr.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Cast.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Cast/Array.php:
--------------------------------------------------------------------------------
1 | $class,
21 | 'name' => $name
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Clone.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ClosureUse.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'byRef' => $byRef
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Concat.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ConstFetch.php:
--------------------------------------------------------------------------------
1 | $name
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Div.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Empty.php:
--------------------------------------------------------------------------------
1 | $var
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Equal.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ErrorSuppress.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Eval.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Exit.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/FuncCall.php:
--------------------------------------------------------------------------------
1 | $name,
21 | 'args' => $args
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Greater.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/GreaterOrEqual.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Identical.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Include.php:
--------------------------------------------------------------------------------
1 | $expr,
26 | 'type' => $type
27 | ),
28 | $line, $docComment
29 | );
30 | }
31 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Instanceof.php:
--------------------------------------------------------------------------------
1 | $expr,
21 | 'class' => $class
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Isset.php:
--------------------------------------------------------------------------------
1 | $vars
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/LogicalAnd.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/LogicalOr.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/LogicalXor.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/MethodCall.php:
--------------------------------------------------------------------------------
1 | $var,
23 | 'name' => $name,
24 | 'args' => $args
25 | ),
26 | $line, $docComment
27 | );
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Minus.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Mod.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Mul.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/New.php:
--------------------------------------------------------------------------------
1 | $class,
21 | 'args' => $args
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/NotEqual.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/NotIdentical.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Plus.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/PostDec.php:
--------------------------------------------------------------------------------
1 | $var
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/PostInc.php:
--------------------------------------------------------------------------------
1 | $var
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/PreDec.php:
--------------------------------------------------------------------------------
1 | $var
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/PreInc.php:
--------------------------------------------------------------------------------
1 | $var
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Print.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/PropertyFetch.php:
--------------------------------------------------------------------------------
1 | $var,
21 | 'name' => $name
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ShellExec.php:
--------------------------------------------------------------------------------
1 | $parts
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ShiftLeft.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/ShiftRight.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Smaller.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/SmallerOrEqual.php:
--------------------------------------------------------------------------------
1 | $left,
21 | 'right' => $right
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/StaticCall.php:
--------------------------------------------------------------------------------
1 | $class,
23 | 'name' => $name,
24 | 'args' => $args
25 | ),
26 | $line, $docComment
27 | );
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/StaticPropertyFetch.php:
--------------------------------------------------------------------------------
1 | $class,
21 | 'name' => $name
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Ternary.php:
--------------------------------------------------------------------------------
1 | $cond,
23 | 'if' => $if,
24 | 'else' => $else
25 | ),
26 | $line, $docComment
27 | );
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/UnaryMinus.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/UnaryPlus.php:
--------------------------------------------------------------------------------
1 | $expr
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Expr/Variable.php:
--------------------------------------------------------------------------------
1 | $name
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Name/FullyQualified.php:
--------------------------------------------------------------------------------
1 | $parts
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Scalar/FileConst.php:
--------------------------------------------------------------------------------
1 | $num,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Case.php:
--------------------------------------------------------------------------------
1 | $conds,
21 | 'stmts' => $stmts,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Catch.php:
--------------------------------------------------------------------------------
1 | $type,
23 | 'var' => $var,
24 | 'stmts' => $stmts,
25 | ),
26 | $line, $docComment
27 | );
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/ClassConst.php:
--------------------------------------------------------------------------------
1 | $name,
19 | 'value' => array($value),
20 | ),
21 | $line, $docComment
22 | );
23 | }
24 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Const.php:
--------------------------------------------------------------------------------
1 | $consts,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Continue.php:
--------------------------------------------------------------------------------
1 | $num,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Declare.php:
--------------------------------------------------------------------------------
1 | $declares,
21 | 'stmts' => $stmts,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/DeclareDeclare.php:
--------------------------------------------------------------------------------
1 | value pair node.
11 | *
12 | * @param string $key Key
13 | * @param PHPParser_Node_Expr $value Value
14 | * @param int $line Line
15 | * @param null|string $docComment Nearest doc comment
16 | */
17 | public function __construct($key, PHPParser_Node_Expr $value, $line = -1, $docComment = null) {
18 | parent::__construct(
19 | array(
20 | 'key' => $key,
21 | 'value' => $value,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Do.php:
--------------------------------------------------------------------------------
1 | $cond,
21 | 'stmts' => $stmts,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Echo.php:
--------------------------------------------------------------------------------
1 | $exprs,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Else.php:
--------------------------------------------------------------------------------
1 | $stmts,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/ElseIf.php:
--------------------------------------------------------------------------------
1 | $cond,
21 | 'stmts' => $stmts,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Global.php:
--------------------------------------------------------------------------------
1 | $vars,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Goto.php:
--------------------------------------------------------------------------------
1 | $name,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/HaltCompiler.php:
--------------------------------------------------------------------------------
1 | $remaining,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Import.php:
--------------------------------------------------------------------------------
1 | ltrim($name, '$'),
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/ImportPath.php:
--------------------------------------------------------------------------------
1 | ltrim($name, '$'),
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Imports.php:
--------------------------------------------------------------------------------
1 | $import_paths,
19 | 'imports' => $imports,
20 | ),
21 | $line, $docComment
22 | );
23 | }
24 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/InlineHTML.php:
--------------------------------------------------------------------------------
1 | $value,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Label.php:
--------------------------------------------------------------------------------
1 | $name,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Property.php:
--------------------------------------------------------------------------------
1 | $type,
21 | 'props' => $props,
22 | )
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/PropertyProperty.php:
--------------------------------------------------------------------------------
1 | $name,
21 | 'default' => $default,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Return.php:
--------------------------------------------------------------------------------
1 | $expr,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Static.php:
--------------------------------------------------------------------------------
1 | $vars,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/StaticVar.php:
--------------------------------------------------------------------------------
1 | $name,
21 | 'default' => $default,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Switch.php:
--------------------------------------------------------------------------------
1 | $cond,
21 | 'cases' => $cases,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Throw.php:
--------------------------------------------------------------------------------
1 | $expr,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Trait.php:
--------------------------------------------------------------------------------
1 | $name,
21 | 'stmts' => $stmts,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/TraitUse.php:
--------------------------------------------------------------------------------
1 | $traits,
21 | 'adaptations' => $adaptations,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation.php:
--------------------------------------------------------------------------------
1 | $trait,
23 | 'method' => $method,
24 | 'insteadof' => $insteadof,
25 | ),
26 | $line, $docComment
27 | );
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/TryCatch.php:
--------------------------------------------------------------------------------
1 | $stmts,
21 | 'catches' => $catches,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Unset.php:
--------------------------------------------------------------------------------
1 | $vars,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/Use.php:
--------------------------------------------------------------------------------
1 | $uses,
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/UseUse.php:
--------------------------------------------------------------------------------
1 | getLast();
20 | }
21 |
22 | if ('self' == $alias || 'parent' == $alias) {
23 | throw new PHPParser_Error(sprintf(
24 | 'Cannot use "%s" as "%s" because "%2$s" is a special class name',
25 | $name, $alias
26 | ));
27 | }
28 |
29 | parent::__construct(
30 | array(
31 | 'name' => $name,
32 | 'alias' => $alias,
33 | ),
34 | $line, $docComment
35 | );
36 | }
37 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/Node/Stmt/While.php:
--------------------------------------------------------------------------------
1 | $cond,
21 | 'stmts' => $stmts,
22 | ),
23 | $line, $docComment
24 | );
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/NodeDumper.php:
--------------------------------------------------------------------------------
1 | getType() . '(';
15 | } elseif (is_array($node)) {
16 | $r = 'array(';
17 | } else {
18 | throw new InvalidArgumentException('Can only dump nodes and arrays.');
19 | }
20 |
21 | foreach ($node as $key => $value) {
22 | $r .= "\n" . ' ' . $key . ': ';
23 |
24 | if (null === $value) {
25 | $r .= 'null';
26 | } elseif (false === $value) {
27 | $r .= 'false';
28 | } elseif (true === $value) {
29 | $r .= 'true';
30 | } elseif (is_scalar($value)) {
31 | $r .= $value;
32 | } else {
33 | $r .= str_replace("\n", "\n" . ' ', $this->dump($value));
34 | }
35 | }
36 |
37 | return $r . "\n" . ')';
38 | }
39 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/lib/PHPParser/NodeVisitorAbstract.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 | ./test/
16 |
17 |
18 |
19 |
20 |
21 | ./lib/PHPParser/
22 |
23 |
24 |
--------------------------------------------------------------------------------
/libs/PHP-Parser/test/PHPParser/Tests/BuilderFactoryTest.php:
--------------------------------------------------------------------------------
1 | assertInstanceOf('PHPParser_Builder_Class', $factory->class('Test'));
8 | }
9 |
10 | public function testCreateMethodBuilder() {
11 | $factory = new PHPParser_BuilderFactory;
12 | $this->assertInstanceOf('PHPParser_Builder_Method', $factory->method('test'));
13 | }
14 |
15 | public function testCreateParamBuilder() {
16 | $factory = new PHPParser_BuilderFactory;
17 | $this->assertInstanceOf('PHPParser_Builder_Param', $factory->param('test'));
18 | }
19 |
20 | public function testCreatePropertyBuilder() {
21 | $factory = new PHPParser_BuilderFactory;
22 | $this->assertInstanceOf('PHPParser_Builder_Property', $factory->property('test'));
23 | }
24 |
25 | public function testCreateFunctionBuilder() {
26 | $factory = new PHPParser_BuilderFactory;
27 | $this->assertInstanceOf('PHPParser_Builder_Function', $factory->function('test'));
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/test/PHPParser/Tests/ErrorTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('Some error', $error->getRawMessage());
9 | $this->assertEquals(10, $error->getRawLine());
10 | $this->assertEquals('Some error on line 10', $error->getMessage());
11 |
12 | return $error;
13 | }
14 |
15 | /**
16 | * @depends testConstruct
17 | */
18 | public function testSetMessageAndLine(PHPParser_Error $error) {
19 | $error->setRawMessage('Some other error');
20 | $error->setRawLine(15);
21 |
22 | $this->assertEquals('Some other error', $error->getRawMessage());
23 | $this->assertEquals(15, $error->getRawLine());
24 | $this->assertEquals('Some other error on line 15', $error->getMessage());
25 | }
26 |
27 | public function testUnknownLine() {
28 | $error = new PHPParser_Error('Some error');
29 |
30 | $this->assertEquals(-1, $error->getRawLine());
31 | $this->assertEquals('Some error on unknown line', $error->getMessage());
32 | }
33 | }
--------------------------------------------------------------------------------
/libs/PHP-Parser/test/code/expr/clone.test:
--------------------------------------------------------------------------------
1 | Clone
2 | -----
3 |
8 | Hallo World!
9 | -----
10 | array(
11 | 0: Expr_Variable(
12 | name: a
13 | )
14 | 1: Stmt_HaltCompiler(
15 | remaining: Hallo World!
16 | )
17 | )
18 | -----
19 |
6 | B
7 |
10 |
10 | Hi!
11 | -----
12 | array(
13 | 0: Stmt_Declare(
14 | declares: array(
15 | 0: Stmt_DeclareDeclare(
16 | key: A
17 | value: Scalar_String(
18 | value: B
19 | )
20 | )
21 | )
22 | stmts: array(
23 | )
24 | )
25 | 1: Stmt_Namespace(
26 | name: Name(
27 | parts: array(
28 | 0: B
29 | )
30 | )
31 | stmts: array(
32 | )
33 | )
34 | 2: Stmt_HaltCompiler(
35 | remaining: Hi!
36 | )
37 | )
--------------------------------------------------------------------------------
/libs/PHP-Parser/test/code/stmt/namespace/outsideStmt.test-fail:
--------------------------------------------------------------------------------
1 | There (mostly) can't be statements outside of namespaces
2 | -----
3 | $items
19 | ),
20 | $line, $docComment
21 | );
22 | }
23 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/Node/Expr/DictItem.php:
--------------------------------------------------------------------------------
1 | $key,
23 | 'value' => $value,
24 | ),
25 | $line, $docComment
26 | );
27 | }
28 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/Node/Expr/ExistenceIsset.php:
--------------------------------------------------------------------------------
1 | $test_for,
8 | 'default' => $default,
9 | ),
10 | $line, $docComment
11 | );
12 | }
13 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/Node/Expr/ExistenceNotEmpty.php:
--------------------------------------------------------------------------------
1 | $test_for,
8 | 'default' => $default,
9 | ),
10 | $line, $docComment
11 | );
12 | }
13 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/Node/Expr/Receiver.php:
--------------------------------------------------------------------------------
1 | args, new PHPParser_Node_Arg($input));
6 | parent::__construct(
7 | array(
8 | 'fn' => $fn,
9 | ),
10 | $line, $docComment
11 | );
12 | }
13 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/Node/Stmt/Extends.php:
--------------------------------------------------------------------------------
1 | $name,
17 | ),
18 | $line, $docComment
19 | );
20 | }
21 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/Node/Stmt/Implements.php:
--------------------------------------------------------------------------------
1 | $names,
17 | ),
18 | $line, $docComment
19 | );
20 | }
21 | }
--------------------------------------------------------------------------------
/src/php/Snowscript/__project.snow:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/runekaagaard/snowscript/8d22c37def05c5022316b17fa7a8057e219b58f6/src/php/Snowscript/__project.snow
--------------------------------------------------------------------------------
/src/php/bootstrap.php:
--------------------------------------------------------------------------------
1 | %s" % (group, value)
32 | return result
33 |
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0000.basics.test:
--------------------------------------------------------------------------------
1 | a = 4
2 | ----
3 | NAME = NUMBER<4>
4 | ++++
5 | b = 2 * 3 + 4 - 12 / 13
6 | ----
7 | NAME = NUMBER<2> * NUMBER<3> + NUMBER<4> - NUMBER<12> / NUMBER<13>
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0002_indentation.test:
--------------------------------------------------------------------------------
1 | fn foo
2 | fn bar
3 | pass
4 | ----
5 | FN PHP_STRING
6 | FN PHP_STRING
7 | PASS
8 | ++++
9 | fn foo()
10 | pass
11 | fn bar()
12 | pass
13 | ----
14 | FN PHP_STRING ( )
15 | PASS
16 | FN PHP_STRING ( )
17 | PASS
18 | ++++
19 | for i in is
20 | print i
21 | fn foo
22 | <- 42
23 | fn bar: <- get_bar()
24 | yo()
25 | echo bar
26 | ----
27 | FOR ( NAME IN NAME )
28 | PRINT NAME
29 | FN PHP_STRING
30 | <- NUMBER<42>
31 | FN PHP_STRING : <- PHP_STRING ( )
32 | PHP_STRING ( )
33 | ECHO NAME
34 | ++++
35 | fn myfunc
36 | for i in [a,
37 | # Comment
38 | too
39 | b
40 | # Comment
41 | Comment
42 | ]:
43 | print yo
44 | ----
45 | FN PHP_STRING
46 | FOR ( NAME IN [ NAME , COMMENT<# Comment
47 | too> NAME COMMENT<# Comment
48 | Comment> ] ) :
49 | PRINT NAME
50 | ++++
51 | call_funct(
52 | b,
53 | c,
54 | # Comment
55 | To,
56 | d(wassup),
57 | a > 3
58 | )
59 | ----
60 | PHP_STRING ( NAME , NAME , COMMENT<# Comment
61 | To,> PHP_STRING ( NAME ) , NAME > NUMBER<3> )
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0003_comments.test:
--------------------------------------------------------------------------------
1 | a
2 | ----
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0004_control_structures.test:
--------------------------------------------------------------------------------
1 | if a == b
2 | echo b
3 | fn c: <- 42
4 | while true
5 | break
6 | ----
7 | IF ( NAME == NAME )
8 | ECHO NAME
9 | FN PHP_STRING : <- NUMBER<42>
10 | WHILE ( TRUE )
11 | NAME
12 | ++++
13 | x = switch foo
14 | case 'foo'
15 | <- "yo"
16 | case 'bar': echo "sup"
17 | ----
18 | NAME = SWITCH ( NAME )
19 | CASE STRING
20 | <- STRING
21 | CASE STRING : ECHO STRING
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0005_inline_html.test:
--------------------------------------------------------------------------------
1 | i_am_snow()
2 | %> I am html
3 | still html
4 | <%
5 | now_snow_again()
6 | %> and
7 | html
8 | to
9 | the
10 | end
11 | ----
12 | PHP_STRING ( )
13 | INLINE_HTML< I am html
14 | still html
15 | >
16 | PHP_STRING ( )
17 | INLINE_HTML< and
18 | html
19 | to
20 | the
21 | end>
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0006_globals.test:
--------------------------------------------------------------------------------
1 | MYCONST = 52
2 | echo ALSO_CONST___
3 | ----
4 | PHP_STRING = NUMBER<52>
5 | ECHO PHP_STRING
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0007_variable_variable.test:
--------------------------------------------------------------------------------
1 | a = 32
2 | b = {c}()
3 | d = echo {b} + 32
4 | ----
5 | NAME = NUMBER<32>
6 | NAME = { NAME } ( )
7 | NAME = ECHO { NAME } + NUMBER<32>
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0008_name_conversion.test:
--------------------------------------------------------------------------------
1 | fn foo(Boz baz):
2 | pass
3 | ----
4 | FN PHP_STRING ( PHP_STRING NAME ) :
5 | PASS
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0009_missing_parenthesis.test:
--------------------------------------------------------------------------------
1 | if a > 3
2 | pass
3 | if (a > 3) and (b > 3)
4 | pass
5 | if (a > 3 and b > 3)
6 | pass
7 | if a > 3: pass
8 | if [a: b] != c: pass
9 | while a>3 or b != 5
10 | pass
11 | for a in as:
12 | pass
13 | if a > 3: pass
14 | elif b > 3:pass
15 | else
16 | pass
17 | switch b:
18 | case '42': pass
19 | ----
20 | IF ( NAME > NUMBER<3> )
21 | PASS
22 | IF ( ( NAME > NUMBER<3> ) AND ( NAME > NUMBER<3> ) )
23 | PASS
24 | IF ( ( NAME > NUMBER<3> AND NAME > NUMBER<3> ) )
25 | PASS
26 | IF ( NAME > NUMBER<3> ) : PASS
27 | IF ( [ NAME : NAME ] != NAME ) : PASS
28 | WHILE ( NAME > NUMBER<3> OR NAME != NUMBER<5> )
29 | PASS
30 | FOR ( NAME IN NAME ) :
31 | PASS
32 | IF ( NAME > NUMBER<3> ) : PASS
33 | ELIF ( NAME > NUMBER<3> ) : PASS
34 | ELSE
35 | PASS
36 | SWITCH ( NAME ) :
37 | CASE STRING<42> : PASS
--------------------------------------------------------------------------------
/src/python/snow/lexer/tests/0010_switch.test:
--------------------------------------------------------------------------------
1 | fn x
2 | switch a
3 | 0,1
4 | b
5 | c
6 | 2,3
7 | d
8 | e
9 |
10 | switch f
11 | 4,5
12 | g
13 | h
14 | 6,7
15 | i
16 | j
17 |
18 | switch a
19 | 0,1
20 | k
21 | l
22 | 2,3
23 | d
24 | e
25 |
26 | switch f
27 | 4,5
28 | g
29 | h
30 | 6,7
31 | i
32 | j
33 | ----
34 |
--------------------------------------------------------------------------------
/tests-failing/expr/closure.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Closures
3 | --FILE--
4 | b['c']();
18 | a()['b'];
--------------------------------------------------------------------------------
/tests-failing/expr/fetchAndCall/newDeref.php:
--------------------------------------------------------------------------------
1 | b;
16 | (new Ab())->b();
17 | (new Ab())['b'];
18 | (new Ab())['b']['c'];
--------------------------------------------------------------------------------
/tests-failing/expr/fetchAndCall/objectAccess.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Object access
3 | --FILE--
4 | b;
17 | $a->b['c'];
18 | $a->b();
19 | $a->b['c']();
20 | $a->b()['c'];
--------------------------------------------------------------------------------
/tests-failing/expr/fetchAndCall/simpleArrayAccess.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Simple array access
3 | --FILE--
4 |
13 | Hi!
14 | ', 0);
15 | --EXPECT--
16 |
22 | Hi!
--------------------------------------------------------------------------------
/tests/README.rst:
--------------------------------------------------------------------------------
1 | Tests
2 | =====
3 |
4 | Snowscript is tested using the PHPT testing tool. The full testsuite can be
5 | run with::
6 |
7 | cd tests
8 | pear run-tests -r
9 |
10 | You can glob to run individual tests::
11 |
12 | pear run-tests stmt/class/*
13 |
14 | PHPT generates .out, .diff and other files for failing tests. Read more about
15 | PHPT at http://qa.php.net/write-test.php.
16 |
--------------------------------------------------------------------------------
/tests/bootstrap_tests.php:
--------------------------------------------------------------------------------
1 | parse($lexer);
18 | $nodeDumper = new PHPParser_NodeDumper;
19 | echo $nodeDumper->dump($stmts);
20 | }
21 |
22 | function prettyprint_tokens($tokens) {
23 | foreach ($tokens as $t)
24 | if (is_array($t))
25 | echo token_name($t[0]) === 'T_WHITESPACE'
26 | ? ""
27 | : token_name($t[0]) . ': ' . trim($t[1]) . "\n";
28 | else
29 | echo $t . "\n";
30 | }
31 |
32 | function pp_php($code) {
33 | prettyprint_tokens(token_get_all("load->model('HelloModel', 'hello');
24 | $this->hello->say_hi('john');
25 | echo 5 % 2;
26 | }
27 | }
--------------------------------------------------------------------------------
/tests/expr/arrayDef.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Array definitions
3 | --FILE--
4 | 2, 'nice' => snow_list(array(snow_dict(array('why' => 'not', 'key' => snow_dict(array('x' => snow_list(array(snow_list(array(snow_list(array(snow_list(array(snow_list(array())))))))))))))))));
29 | $this->scopes[-1]->fns[$node->name] = $node;
--------------------------------------------------------------------------------
/tests/expr/assign.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Testing Hello World example.
3 | --FILE--
4 | >= $b;
42 | $a =& $b;
43 | $a = new B();
44 | list($a, $b, $c) = $d;
45 | list($a, list(, $c), $d) = $e;
46 | list($a, , $c) = $c;
47 | list($a, list($foo['bar'], $foo->bar, list(d(), E)), $f) = $g;
--------------------------------------------------------------------------------
/tests/expr/cast.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Casts
3 | --FILE--
4 | b
12 | a >= b
13 | a == b
14 | a != b
15 | a isa B
16 | a isa b
17 | ', 0);
18 | --EXPECT--
19 | count()->var_dump()
11 | a.foo = "hello"
12 | a.foo->var_dump()
13 | {'x': 2} == {'x': 2} -> var_dump()
14 |
15 | SNOW
16 | );
17 | --EXPECT--
18 | int(0)
19 | int(1)
20 | int(42)
21 | int(42)
22 | int(3)
--------------------------------------------------------------------------------
/tests/expr/existence.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Testing Hello World example.
3 | --FILE--
4 | count()->var_dump()
11 | a.append('i')->count()->var_dump()
12 | a.extend([1,2,42]).get(3)->var_dump()
13 | a.pop()->var_dump()
14 | a->count()->var_dump()
15 |
16 | ");
17 | --EXPECT--
18 | int(0)
19 | int(1)
20 | int(42)
21 | int(42)
22 | int(3)
--------------------------------------------------------------------------------
/tests/expr/logic.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Logical operators
3 | --FILE--
4 | > $b;
43 | ($a * $b) * $c;
44 | $a * ($b * $c);
45 | $a + $b * $c;
46 | ($a + $b) * $c;
--------------------------------------------------------------------------------
/tests/expr/names.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Variables
3 | --FILE--
4 | b->c;
26 | $a->b->CAP;
27 | A::$prop;
28 | $a::func();
29 | A::A_KONST;
30 | $avar;
31 | afunccall();
32 | $A_VAR;
33 | A_CONST;
34 | foo(&$a, &$b);
35 | function foo(MyClass $bar, array $fox, $zup)
36 | {
37 |
38 | }
--------------------------------------------------------------------------------
/tests/expr/new.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | New
3 | --FILE--
4 | b();
24 | new $a->b->c();
25 | new $a->b['c']();
26 | A;
27 | new A();
--------------------------------------------------------------------------------
/tests/expr/print.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Print
3 | --FILE--
4 | func(32)
9 | 42->doit() - 41
10 | hi->ok()
11 | array_slice(guy, start, guy->count()-stop)
12 | ", 0);
13 | --EXPECT--
14 | foo;
30 | parent::bos();
31 | }
32 |
33 | public function baz()
34 | {
35 | self::$baz;
36 | $this->baz;
37 | parent::baz();
38 | }
39 | }
--------------------------------------------------------------------------------
/tests/stmt/class/interface.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Interface
3 | --FILE--
4 | 'baz'), $i = array('foo'))
22 | {
23 |
24 | }
--------------------------------------------------------------------------------
/tests/stmt/function/specialVars.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Special function variables
3 | --FILE--
4 |