gulp-phug 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +23 -8
- package/package.json +4 -4
- package/support/composer.json +1 -1
- package/support/composer.lock +93 -178
- package/support/vendor/autoload.php +15 -0
- package/support/vendor/bin/phug +119 -0
- package/support/vendor/bin/var-dump-server +119 -0
- package/support/vendor/composer/ClassLoader.php +166 -32
- package/support/vendor/composer/InstalledVersions.php +387 -329
- package/support/vendor/composer/autoload_classmap.php +1 -5
- package/support/vendor/composer/autoload_files.php +2 -3
- package/support/vendor/composer/autoload_namespaces.php +1 -1
- package/support/vendor/composer/autoload_psr4.php +3 -4
- package/support/vendor/composer/autoload_real.php +12 -37
- package/support/vendor/composer/autoload_static.php +6 -17
- package/support/vendor/composer/installed.json +97 -184
- package/support/vendor/composer/installed.php +129 -151
- package/support/vendor/composer/platform_check.php +16 -4
- package/support/vendor/phug/phug/.github/workflows/coverage.yml +71 -0
- package/support/vendor/phug/phug/.github/workflows/multi-tester.yml +46 -0
- package/support/vendor/phug/phug/.github/workflows/split.yml +41 -0
- package/support/vendor/phug/phug/.github/workflows/style.yml +48 -0
- package/support/vendor/phug/phug/.github/workflows/tests.yml +49 -0
- package/support/vendor/phug/phug/.multi-tester.yml +42 -10
- package/support/vendor/phug/phug/composer.json +25 -16
- package/support/vendor/phug/phug/phpcs.xml +4 -0
- package/support/vendor/phug/phug/phpunit.xml +2 -0
- package/support/vendor/phug/phug/phug +1 -1
- package/support/vendor/phug/phug/release.php +8 -0
- package/support/vendor/phug/phug/src/Phug/Ast/Ast/Node.php +7 -1
- package/support/vendor/phug/phug/src/Phug/Ast/composer.json +1 -2
- package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/Element/BlockElement.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AssignmentNodeCompiler.php +9 -1
- package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AttributeNodeCompiler.php +1 -0
- package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ElementNodeCompiler.php +6 -0
- package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ImportNodeCompiler.php +4 -4
- package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompilerInterface.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Compiler/composer.json +5 -2
- package/support/vendor/phug/phug/src/Phug/DependencyInjection/DependencyInjection.php +1 -1
- package/support/vendor/phug/phug/src/Phug/DependencyInjection/composer.json +1 -2
- package/support/vendor/phug/phug/src/Phug/Event/Event/ListenerQueue.php +3 -0
- package/support/vendor/phug/phug/src/Phug/Event/EventManagerTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Event/composer.json +1 -2
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/AbstractFormat.php +15 -12
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/AssignmentContainerInterface.php +2 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AbstractAssignmentContainerElement.php +11 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AbstractMarkupElement.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AssignmentElement.php +9 -4
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AttributeElement.php +4 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/CodeElement.php +2 -2
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/MarkupElement.php +10 -8
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/MixinCallElement.php +2 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/MixinElement.php +2 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/XmlFormat.php +213 -20
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Partial/AssignmentHelpersTrait.php +7 -4
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Partial/HandleVariable.php +4 -4
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Partial/MagicAccessorTrait.php +1 -7
- package/support/vendor/phug/phug/src/Phug/Formatter/Formatter.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Formatter/composer.json +1 -2
- package/support/vendor/phug/phug/src/Phug/Invoker/Invoker.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Invoker/composer.json +5 -2
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Partial/IndentStyleTrait.php +5 -5
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/AssignmentScanner.php +8 -2
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/AttributeScanner.php +23 -11
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/ConditionalScanner.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/FilterScanner.php +6 -10
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/IndentationScanner.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/KeywordScanner.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/MultilineScanner.php +6 -12
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/Partial/TrailingOutdentHandlerTrait.php +26 -0
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/TextScanner.php +3 -3
- package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/State.php +9 -9
- package/support/vendor/phug/phug/src/Phug/Lexer/composer.json +1 -2
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Event/NodeEvent.php +3 -2
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node/AssignmentNode.php +5 -1
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node/AttributeNode.php +4 -1
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node/ElementNode.php +5 -1
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node/FilterNode.php +2 -1
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node/MixinCallNode.php +5 -1
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node/MixinNode.php +5 -1
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AbstractTokenHandler.php +87 -0
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AssignmentTokenHandler.php +6 -21
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AttributeEndTokenHandler.php +5 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AttributeStartTokenHandler.php +7 -23
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AttributeTokenHandler.php +21 -19
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AutoCloseTokenHandler.php +5 -17
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/BlockTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/CaseTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ClassTokenHandler.php +7 -34
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/CodeTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/CommentTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ConditionalTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/DoTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/DoctypeTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/EachTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ExpansionTokenHandler.php +5 -11
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ExpressionTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/FilterTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ForTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/IdTokenHandler.php +7 -33
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ImportTokenHandler.php +14 -20
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/IndentTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/InterpolationEndTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/InterpolationStartTokenHandler.php +29 -30
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/KeywordTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/MixinCallTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/MixinTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/NewLineTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/OutdentTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/Partial/StaticAttributeTrait.php +36 -0
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/TagInterpolationEndTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/TagInterpolationStartTokenHandler.php +7 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/TagTokenHandler.php +6 -21
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/TextTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/VariableTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/WhenTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/WhileTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/YieldTokenHandler.php +4 -10
- package/support/vendor/phug/phug/src/Phug/Parser/Parser.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Parser/composer.json +1 -2
- package/support/vendor/phug/phug/src/Phug/Phug/Phug/Cli.php +5 -5
- package/support/vendor/phug/phug/src/Phug/Phug/Phug/Partial/ExtensionsTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Phug/Phug/Partial/FacadeOptionsTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Phug/Phug/Phug.php +14 -5
- package/support/vendor/phug/phug/src/Phug/Phug/composer.json +5 -2
- package/support/vendor/phug/phug/src/Phug/Reader/Reader.php +9 -9
- package/support/vendor/phug/phug/src/Phug/Reader/composer.json +4 -0
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Adapter/FileAdapter.php +21 -4
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Adapter/Stream/Template.php +5 -0
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Adapter/StreamAdapter.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/CacheInterface.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Partial/AdapterTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Partial/Debug/DebuggerTrait.php +56 -10
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Partial/RendererOptionsTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Profiler/Dump.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Profiler/LinkDump.php +2 -2
- package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Profiler/ProfilerModule.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Renderer/composer.json +7 -3
- package/support/vendor/phug/phug/src/Phug/Util/CompatibilityUtil/TestCaseTyped.php +67 -0
- package/support/vendor/phug/phug/src/Phug/Util/CompatibilityUtil/TestCaseUntyped.php +67 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/AttributesInterface.php +16 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/AttributesOrderInterface.php +17 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/AttributesStorage.php +44 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/Collection.php +2 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/OrderableInterface.php +22 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/OrderedValue.php +25 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/AttributeTrait.php +2 -1
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/AttributesOrderTrait.php +19 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/ModuleContainerTrait.php +3 -3
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/OptionTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/OrderTrait.php +27 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/StaticMemberTrait.php +1 -1
- package/support/vendor/phug/phug/src/Phug/Util/Util/Partial/ValueTrait.php +5 -3
- package/support/vendor/phug/phug/src/Phug/Util/Util/SandBox.php +1 -0
- package/support/vendor/phug/phug/src/Phug/Util/Util/TestCase.php +47 -4
- package/support/vendor/phug/phug/src/Phug/Util/composer.json +5 -6
- package/support/vendor/symfony/deprecation-contracts/CHANGELOG.md +5 -0
- package/support/vendor/symfony/{polyfill-php72 → deprecation-contracts}/LICENSE +1 -1
- package/support/vendor/symfony/deprecation-contracts/README.md +26 -0
- package/support/vendor/symfony/{polyfill-php72 → deprecation-contracts}/composer.json +9 -9
- package/support/vendor/symfony/deprecation-contracts/function.php +27 -0
- package/support/vendor/symfony/polyfill-mbstring/LICENSE +1 -1
- package/support/vendor/symfony/polyfill-mbstring/Mbstring.php +256 -57
- package/support/vendor/symfony/polyfill-mbstring/README.md +1 -1
- package/support/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php +119 -0
- package/support/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +1 -1
- package/support/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +102 -27
- package/support/vendor/symfony/polyfill-mbstring/bootstrap.php +33 -8
- package/support/vendor/symfony/polyfill-mbstring/bootstrap80.php +167 -0
- package/support/vendor/symfony/polyfill-mbstring/composer.json +5 -4
- package/support/vendor/symfony/var-dumper/CHANGELOG.md +63 -0
- package/support/vendor/symfony/var-dumper/Caster/AddressInfoCaster.php +82 -0
- package/support/vendor/symfony/var-dumper/Caster/AmqpCaster.php +12 -10
- package/support/vendor/symfony/var-dumper/Caster/ArgsStub.php +6 -7
- package/support/vendor/symfony/var-dumper/Caster/Caster.php +59 -31
- package/support/vendor/symfony/var-dumper/Caster/ClassStub.php +7 -9
- package/support/vendor/symfony/var-dumper/Caster/ConstStub.php +20 -4
- package/support/vendor/symfony/var-dumper/Caster/CurlCaster.php +31 -0
- package/support/vendor/symfony/var-dumper/Caster/CutArrayStub.php +1 -1
- package/support/vendor/symfony/var-dumper/Caster/CutStub.php +2 -2
- package/support/vendor/symfony/var-dumper/Caster/DOMCaster.php +61 -156
- package/support/vendor/symfony/var-dumper/Caster/DateCaster.php +27 -26
- package/support/vendor/symfony/var-dumper/Caster/DoctrineCaster.php +6 -4
- package/support/vendor/symfony/var-dumper/Caster/DsCaster.php +1 -1
- package/support/vendor/symfony/var-dumper/Caster/DsPairStub.php +1 -1
- package/support/vendor/symfony/var-dumper/Caster/EnumStub.php +4 -5
- package/support/vendor/symfony/var-dumper/Caster/ExceptionCaster.php +64 -49
- package/support/vendor/symfony/var-dumper/Caster/FFICaster.php +171 -0
- package/support/vendor/symfony/var-dumper/Caster/FiberCaster.php +43 -0
- package/support/vendor/symfony/var-dumper/Caster/FrameStub.php +6 -8
- package/support/vendor/symfony/var-dumper/Caster/GdCaster.php +30 -0
- package/support/vendor/symfony/var-dumper/Caster/GmpCaster.php +4 -2
- package/support/vendor/symfony/var-dumper/Caster/ImagineCaster.php +2 -0
- package/support/vendor/symfony/var-dumper/Caster/ImgStub.php +1 -1
- package/support/vendor/symfony/var-dumper/Caster/IntlCaster.php +10 -8
- package/support/vendor/symfony/var-dumper/Caster/LinkStub.php +14 -17
- package/support/vendor/symfony/var-dumper/Caster/MemcachedCaster.php +10 -8
- package/support/vendor/symfony/var-dumper/Caster/MysqliCaster.php +33 -0
- package/support/vendor/symfony/var-dumper/Caster/OpenSSLCaster.php +69 -0
- package/support/vendor/symfony/var-dumper/Caster/PdoCaster.php +8 -6
- package/support/vendor/symfony/var-dumper/Caster/PgSqlCaster.php +21 -19
- package/support/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php +4 -2
- package/support/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php +188 -0
- package/support/vendor/symfony/var-dumper/Caster/RedisCaster.php +31 -31
- package/support/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +100 -44
- package/support/vendor/symfony/var-dumper/Caster/ResourceCaster.php +33 -46
- package/support/vendor/symfony/var-dumper/Caster/ScalarStub.php +27 -0
- package/support/vendor/symfony/var-dumper/Caster/SocketCaster.php +64 -0
- package/support/vendor/symfony/var-dumper/Caster/SplCaster.php +57 -44
- package/support/vendor/symfony/var-dumper/Caster/SqliteCaster.php +32 -0
- package/support/vendor/symfony/var-dumper/Caster/StubCaster.php +15 -5
- package/support/vendor/symfony/var-dumper/Caster/SymfonyCaster.php +66 -10
- package/support/vendor/symfony/var-dumper/Caster/TraceStub.php +7 -11
- package/support/vendor/symfony/var-dumper/Caster/UninitializedStub.php +25 -0
- package/support/vendor/symfony/var-dumper/Caster/UuidCaster.php +2 -0
- package/support/vendor/symfony/var-dumper/Caster/VirtualStub.php +21 -0
- package/support/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php +25 -10
- package/support/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php +7 -5
- package/support/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +103 -72
- package/support/vendor/symfony/var-dumper/Cloner/ClonerInterface.php +1 -5
- package/support/vendor/symfony/var-dumper/Cloner/Cursor.php +21 -21
- package/support/vendor/symfony/var-dumper/Cloner/Data.php +51 -77
- package/support/vendor/symfony/var-dumper/Cloner/DumperInterface.php +11 -14
- package/support/vendor/symfony/var-dumper/Cloner/Stub.php +40 -31
- package/support/vendor/symfony/var-dumper/Cloner/VarCloner.php +21 -104
- package/support/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php +9 -19
- package/support/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php +10 -11
- package/support/vendor/symfony/var-dumper/Command/ServerDumpCommand.php +27 -15
- package/support/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +68 -48
- package/support/vendor/symfony/var-dumper/Dumper/CliDumper.php +126 -113
- package/support/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php +1 -1
- package/support/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php +0 -3
- package/support/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php +5 -6
- package/support/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +10 -15
- package/support/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php +8 -11
- package/support/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php +3 -0
- package/support/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +122 -146
- package/support/vendor/symfony/var-dumper/Dumper/ServerDumper.php +10 -10
- package/support/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php +1 -1
- package/support/vendor/symfony/var-dumper/LICENSE +1 -1
- package/support/vendor/symfony/var-dumper/README.md +6 -6
- package/support/vendor/symfony/var-dumper/Resources/bin/var-dump-server +4 -0
- package/support/vendor/symfony/var-dumper/Resources/functions/dump.php +35 -10
- package/support/vendor/symfony/var-dumper/Server/Connection.php +16 -14
- package/support/vendor/symfony/var-dumper/Server/DumpServer.php +16 -14
- package/support/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php +9 -9
- package/support/vendor/symfony/var-dumper/VarDumper.php +69 -17
- package/support/vendor/symfony/var-dumper/composer.json +10 -16
- package/support/vendor/symfony/polyfill-php72/Php72.php +0 -217
- package/support/vendor/symfony/polyfill-php72/README.md +0 -28
- package/support/vendor/symfony/polyfill-php72/bootstrap.php +0 -57
- package/support/vendor/symfony/polyfill-php80/LICENSE +0 -19
- package/support/vendor/symfony/polyfill-php80/Php80.php +0 -105
- package/support/vendor/symfony/polyfill-php80/README.md +0 -24
- package/support/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +0 -22
- package/support/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +0 -11
- package/support/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +0 -5
- package/support/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +0 -5
- package/support/vendor/symfony/polyfill-php80/bootstrap.php +0 -42
- package/support/vendor/symfony/polyfill-php80/composer.json +0 -40
package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/AutoCloseTokenHandler.php
CHANGED
|
@@ -3,28 +3,16 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\AutoCloseToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\ElementNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class AutoCloseTokenHandler
|
|
9
|
+
class AutoCloseTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof AutoCloseToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass auto-close tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = AutoCloseToken::class;
|
|
20
12
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
0,
|
|
25
|
-
$token
|
|
26
|
-
);
|
|
27
|
-
}
|
|
13
|
+
public function handleAutoCloseToken(AutoCloseToken $token, State $state)
|
|
14
|
+
{
|
|
15
|
+
$this->assertCurrentNodeIs($token, $state, [ElementNode::class]);
|
|
28
16
|
|
|
29
17
|
$state->getCurrentNode()->autoClose();
|
|
30
18
|
}
|
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\BlockToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\BlockNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class BlockTokenHandler
|
|
9
|
+
class BlockTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof BlockToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass block tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = BlockToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleBlockToken(BlockToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var BlockNode $node */
|
|
22
16
|
$node = $state->createNode(BlockNode::class, $token);
|
|
23
17
|
$node->setName($token->getName());
|
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\CaseToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\CaseNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class CaseTokenHandler
|
|
9
|
+
class CaseTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof CaseToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass case tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = CaseToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleCaseToken(CaseToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var CaseNode $node */
|
|
22
16
|
$node = $state->createNode(CaseNode::class, $token);
|
|
23
17
|
$node->setSubject($token->getSubject());
|
|
@@ -3,44 +3,17 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\ClassToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
|
-
use Phug\Parser\Node\AttributeNode;
|
|
8
|
-
use Phug\Parser\Node\ElementNode;
|
|
9
|
-
use Phug\Parser\Node\MixinCallNode;
|
|
10
6
|
use Phug\Parser\State;
|
|
11
|
-
use Phug\Parser\
|
|
7
|
+
use Phug\Parser\TokenHandler\Partial\StaticAttributeTrait;
|
|
12
8
|
|
|
13
|
-
class ClassTokenHandler
|
|
9
|
+
class ClassTokenHandler extends AbstractTokenHandler
|
|
14
10
|
{
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
if (!($token instanceof ClassToken)) {
|
|
18
|
-
throw new \RuntimeException(
|
|
19
|
-
'You can only pass class tokens to this token handler'
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (!$state->getCurrentNode()) {
|
|
24
|
-
$state->setCurrentNode($state->createNode(ElementNode::class, $token));
|
|
25
|
-
}
|
|
11
|
+
use StaticAttributeTrait;
|
|
26
12
|
|
|
27
|
-
|
|
28
|
-
$state->throwException(
|
|
29
|
-
'Classes can only be used on elements and mixin calls',
|
|
30
|
-
0,
|
|
31
|
-
$token
|
|
32
|
-
);
|
|
33
|
-
}
|
|
13
|
+
const TOKEN_TYPE = ClassToken::class;
|
|
34
14
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
$
|
|
38
|
-
$attr->setName('class');
|
|
39
|
-
$attr->setValue(var_export($token->getName(), true));
|
|
40
|
-
$attr->unescape()->uncheck();
|
|
41
|
-
|
|
42
|
-
/** @var ElementNode|MixinCallNode $current */
|
|
43
|
-
$current = $state->getCurrentNode();
|
|
44
|
-
$current->getAttributes()->attach($attr);
|
|
15
|
+
public function handleClassToken(ClassToken $token, State $state)
|
|
16
|
+
{
|
|
17
|
+
$this->attachStaticAttribute('class', $token, $state);
|
|
45
18
|
}
|
|
46
19
|
}
|
|
@@ -4,21 +4,15 @@ namespace Phug\Parser\TokenHandler;
|
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\CodeToken;
|
|
6
6
|
use Phug\Lexer\Token\TextToken;
|
|
7
|
-
use Phug\Lexer\TokenInterface;
|
|
8
7
|
use Phug\Parser\Node\CodeNode;
|
|
9
8
|
use Phug\Parser\State;
|
|
10
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
11
9
|
|
|
12
|
-
class CodeTokenHandler
|
|
10
|
+
class CodeTokenHandler extends AbstractTokenHandler
|
|
13
11
|
{
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
if (!($token instanceof CodeToken)) {
|
|
17
|
-
throw new \RuntimeException(
|
|
18
|
-
'You can only pass code tokens to this token handler'
|
|
19
|
-
);
|
|
20
|
-
}
|
|
12
|
+
const TOKEN_TYPE = CodeToken::class;
|
|
21
13
|
|
|
14
|
+
public function handleCodeToken(CodeToken $token, State $state)
|
|
15
|
+
{
|
|
22
16
|
/** @var CodeNode $node */
|
|
23
17
|
$node = $state->createNode(CodeNode::class, $token);
|
|
24
18
|
|
package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/CommentTokenHandler.php
CHANGED
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\CommentToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\CommentNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class CommentTokenHandler
|
|
9
|
+
class CommentTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof CommentToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass comment tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = CommentToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleCommentToken(CommentToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var CommentNode $node */
|
|
22
16
|
$node = $state->createNode(CommentNode::class, $token);
|
|
23
17
|
$node->setIsVisible($token->isVisible());
|
package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ConditionalTokenHandler.php
CHANGED
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\ConditionalToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\ConditionalNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class ConditionalTokenHandler
|
|
9
|
+
class ConditionalTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof ConditionalToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass conditional tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = ConditionalToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleConditionalToken(ConditionalToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var ConditionalNode $node */
|
|
22
16
|
$node = $state->createNode(ConditionalNode::class, $token);
|
|
23
17
|
$node->setSubject($token->getSubject());
|
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\DoToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\DoNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class DoTokenHandler
|
|
9
|
+
class DoTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof DoToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass do tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = DoToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleDoToken(DoToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
$node = $state->createNode(DoNode::class, $token);
|
|
22
16
|
$state->setCurrentNode($node);
|
|
23
17
|
}
|
package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/DoctypeTokenHandler.php
CHANGED
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\DoctypeToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\DoctypeNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class DoctypeTokenHandler
|
|
9
|
+
class DoctypeTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof DoctypeToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass doctype tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = DoctypeToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleDoctypeToken(DoctypeToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var DoctypeNode $node */
|
|
22
16
|
$node = $state->createNode(DoctypeNode::class, $token);
|
|
23
17
|
$node->setName($token->getName());
|
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\EachToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\EachNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class EachTokenHandler
|
|
9
|
+
class EachTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof EachToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass each tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = EachToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleEachToken(EachToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var EachNode $node */
|
|
22
16
|
$node = $state->createNode(EachNode::class, $token);
|
|
23
17
|
$node->setSubject($token->getSubject());
|
package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ExpansionTokenHandler.php
CHANGED
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\ExpansionToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\ElementNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class ExpansionTokenHandler
|
|
9
|
+
class ExpansionTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof ExpansionToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass expansion tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = ExpansionToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleExpansionToken(ExpansionToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
if (!$state->getCurrentNode()) {
|
|
22
16
|
$state->throwException(
|
|
23
17
|
'Expansion needs an element to work on',
|
|
@@ -26,7 +20,7 @@ class ExpansionTokenHandler implements TokenHandlerInterface
|
|
|
26
20
|
);
|
|
27
21
|
}
|
|
28
22
|
|
|
29
|
-
if ($
|
|
23
|
+
if ($state->getInterpolationNode()) {
|
|
30
24
|
//Make sure to keep the expansion
|
|
31
25
|
$newNode = $state->createNode(ElementNode::class, $token);
|
|
32
26
|
$newNode->setOuterNode($state->getCurrentNode());
|
package/support/vendor/phug/phug/src/Phug/Parser/Parser/TokenHandler/ExpressionTokenHandler.php
CHANGED
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\ExpressionToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\ExpressionNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class ExpressionTokenHandler
|
|
9
|
+
class ExpressionTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof ExpressionToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass expression tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = ExpressionToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleExpressionToken(ExpressionToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var ExpressionNode $node */
|
|
22
16
|
$node = $state->createNode(ExpressionNode::class, $token);
|
|
23
17
|
$node->setIsEscaped($token->isEscaped());
|
|
@@ -3,22 +3,16 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\FilterToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\FilterNode;
|
|
8
7
|
use Phug\Parser\Node\ImportNode;
|
|
9
8
|
use Phug\Parser\State;
|
|
10
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
11
9
|
|
|
12
|
-
class FilterTokenHandler
|
|
10
|
+
class FilterTokenHandler extends AbstractTokenHandler
|
|
13
11
|
{
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
if (!($token instanceof FilterToken)) {
|
|
17
|
-
throw new \RuntimeException(
|
|
18
|
-
'You can only pass filter tokens to this token handler'
|
|
19
|
-
);
|
|
20
|
-
}
|
|
12
|
+
const TOKEN_TYPE = FilterToken::class;
|
|
21
13
|
|
|
14
|
+
public function handleFilterToken(FilterToken $token, State $state)
|
|
15
|
+
{
|
|
22
16
|
/** @var FilterNode $node */
|
|
23
17
|
$node = $state->createNode(FilterNode::class, $token);
|
|
24
18
|
$node->setName($token->getName());
|
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\ForToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\ForNode;
|
|
8
7
|
use Phug\Parser\State;
|
|
9
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
10
8
|
|
|
11
|
-
class ForTokenHandler
|
|
9
|
+
class ForTokenHandler extends AbstractTokenHandler
|
|
12
10
|
{
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
if (!($token instanceof ForToken)) {
|
|
16
|
-
throw new \RuntimeException(
|
|
17
|
-
'You can only pass for tokens to this token handler'
|
|
18
|
-
);
|
|
19
|
-
}
|
|
11
|
+
const TOKEN_TYPE = ForToken::class;
|
|
20
12
|
|
|
13
|
+
public function handleForToken(ForToken $token, State $state)
|
|
14
|
+
{
|
|
21
15
|
/** @var ForNode $node */
|
|
22
16
|
$node = $state->createNode(ForNode::class, $token);
|
|
23
17
|
$node->setSubject($token->getSubject());
|
|
@@ -3,43 +3,17 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\IdToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
|
-
use Phug\Parser\Node\AttributeNode;
|
|
8
|
-
use Phug\Parser\Node\ElementNode;
|
|
9
|
-
use Phug\Parser\Node\MixinCallNode;
|
|
10
6
|
use Phug\Parser\State;
|
|
11
|
-
use Phug\Parser\
|
|
7
|
+
use Phug\Parser\TokenHandler\Partial\StaticAttributeTrait;
|
|
12
8
|
|
|
13
|
-
class IdTokenHandler
|
|
9
|
+
class IdTokenHandler extends AbstractTokenHandler
|
|
14
10
|
{
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
if (!($token instanceof IdToken)) {
|
|
18
|
-
throw new \RuntimeException(
|
|
19
|
-
'You can only pass id tokens to this token handler'
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (!$state->getCurrentNode()) {
|
|
24
|
-
$state->setCurrentNode($state->createNode(ElementNode::class, $token));
|
|
25
|
-
}
|
|
11
|
+
use StaticAttributeTrait;
|
|
26
12
|
|
|
27
|
-
|
|
28
|
-
$state->throwException(
|
|
29
|
-
'IDs can only be used on elements and mixin calls',
|
|
30
|
-
0,
|
|
31
|
-
$token
|
|
32
|
-
);
|
|
33
|
-
}
|
|
13
|
+
const TOKEN_TYPE = IdToken::class;
|
|
34
14
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
$
|
|
38
|
-
$attr->setValue(var_export($token->getName(), true));
|
|
39
|
-
$attr->unescape()->uncheck();
|
|
40
|
-
|
|
41
|
-
/** @var ElementNode|MixinCallNode $current */
|
|
42
|
-
$current = $state->getCurrentNode();
|
|
43
|
-
$current->getAttributes()->attach($attr);
|
|
15
|
+
public function handleIdToken(IdToken $token, State $state)
|
|
16
|
+
{
|
|
17
|
+
$this->attachStaticAttribute('id', $token, $state);
|
|
44
18
|
}
|
|
45
19
|
}
|
|
@@ -3,35 +3,18 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\ImportToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\Node\CommentNode;
|
|
8
7
|
use Phug\Parser\Node\ImportNode;
|
|
9
8
|
use Phug\Parser\Node\MixinNode;
|
|
10
9
|
use Phug\Parser\NodeInterface;
|
|
11
10
|
use Phug\Parser\State;
|
|
12
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
13
11
|
|
|
14
|
-
class ImportTokenHandler
|
|
12
|
+
class ImportTokenHandler extends AbstractTokenHandler
|
|
15
13
|
{
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
foreach ($document->getChildren() as $child) {
|
|
19
|
-
if (!($child instanceof MixinNode || ($child instanceof CommentNode && !$child->isVisible()))) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
14
|
+
const TOKEN_TYPE = ImportToken::class;
|
|
26
15
|
|
|
27
|
-
public function
|
|
16
|
+
public function handleImportToken(ImportToken $token, State $state)
|
|
28
17
|
{
|
|
29
|
-
if (!($token instanceof ImportToken)) {
|
|
30
|
-
throw new \RuntimeException(
|
|
31
|
-
'You can only pass import tokens to this token handler'
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
18
|
if ($token->getName() === 'extend' && !$this->isEmptyDocument($state->getDocumentNode())) {
|
|
36
19
|
$state->throwException(
|
|
37
20
|
'extends should be the very first statement in a document',
|
|
@@ -46,4 +29,15 @@ class ImportTokenHandler implements TokenHandlerInterface
|
|
|
46
29
|
$node->setPath($token->getPath());
|
|
47
30
|
$state->setCurrentNode($node);
|
|
48
31
|
}
|
|
32
|
+
|
|
33
|
+
protected function isEmptyDocument(NodeInterface $document)
|
|
34
|
+
{
|
|
35
|
+
foreach ($document->getChildren() as $child) {
|
|
36
|
+
if (!($child instanceof MixinNode || ($child instanceof CommentNode && !$child->isVisible()))) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
49
43
|
}
|
|
@@ -3,20 +3,14 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\IndentToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\State;
|
|
8
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
9
7
|
|
|
10
|
-
class IndentTokenHandler
|
|
8
|
+
class IndentTokenHandler extends AbstractTokenHandler
|
|
11
9
|
{
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
if (!($token instanceof IndentToken)) {
|
|
15
|
-
throw new \RuntimeException(
|
|
16
|
-
'You can only pass indent tokens to this token handler'
|
|
17
|
-
);
|
|
18
|
-
}
|
|
10
|
+
const TOKEN_TYPE = IndentToken::class;
|
|
19
11
|
|
|
12
|
+
public function handleIndentToken(IndentToken $token, State $state)
|
|
13
|
+
{
|
|
20
14
|
$state->enter();
|
|
21
15
|
}
|
|
22
16
|
}
|
|
@@ -3,20 +3,14 @@
|
|
|
3
3
|
namespace Phug\Parser\TokenHandler;
|
|
4
4
|
|
|
5
5
|
use Phug\Lexer\Token\InterpolationEndToken;
|
|
6
|
-
use Phug\Lexer\TokenInterface;
|
|
7
6
|
use Phug\Parser\State;
|
|
8
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
9
7
|
|
|
10
|
-
class InterpolationEndTokenHandler
|
|
8
|
+
class InterpolationEndTokenHandler extends AbstractTokenHandler
|
|
11
9
|
{
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
if (!($token instanceof InterpolationEndToken)) {
|
|
15
|
-
throw new \RuntimeException(
|
|
16
|
-
'You can only pass interpolation end tokens to this token handler'
|
|
17
|
-
);
|
|
18
|
-
}
|
|
10
|
+
const TOKEN_TYPE = InterpolationEndToken::class;
|
|
19
11
|
|
|
12
|
+
public function handleInterpolationEndToken(InterpolationEndToken $token, State $state)
|
|
13
|
+
{
|
|
20
14
|
$node = $state->getCurrentNode();
|
|
21
15
|
$nodes = $state->getInterpolationStack()->offsetGet($token);
|
|
22
16
|
$state->setCurrentNode($nodes->currentNode);
|
|
@@ -5,47 +5,22 @@ namespace Phug\Parser\TokenHandler;
|
|
|
5
5
|
use Phug\Lexer\Token\ExpressionToken;
|
|
6
6
|
use Phug\Lexer\Token\InterpolationEndToken;
|
|
7
7
|
use Phug\Lexer\Token\InterpolationStartToken;
|
|
8
|
-
use Phug\Lexer\TokenInterface;
|
|
9
8
|
use Phug\Parser\Node\CodeNode;
|
|
10
9
|
use Phug\Parser\Node\ElementNode;
|
|
11
10
|
use Phug\Parser\Node\ExpressionNode;
|
|
12
11
|
use Phug\Parser\Node\TextNode;
|
|
13
12
|
use Phug\Parser\State;
|
|
14
|
-
use Phug\Parser\TokenHandlerInterface;
|
|
15
13
|
|
|
16
|
-
class InterpolationStartTokenHandler
|
|
14
|
+
class InterpolationStartTokenHandler extends AbstractTokenHandler
|
|
17
15
|
{
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
if (!($token instanceof InterpolationStartToken)) {
|
|
21
|
-
throw new \RuntimeException(
|
|
22
|
-
'You can only pass interpolation start tokens to this token handler'
|
|
23
|
-
);
|
|
24
|
-
}
|
|
16
|
+
const TOKEN_TYPE = InterpolationStartToken::class;
|
|
25
17
|
|
|
18
|
+
public function handleInterpolationStartToken(InterpolationStartToken $token, State $state)
|
|
19
|
+
{
|
|
26
20
|
$node = $state->getCurrentNode();
|
|
27
21
|
|
|
28
22
|
if (!$node && !($state->getPreviousToken() instanceof InterpolationEndToken)) {
|
|
29
|
-
|
|
30
|
-
$element = $state->createNode(ElementNode::class, $token);
|
|
31
|
-
$state->setCurrentNode($element);
|
|
32
|
-
|
|
33
|
-
foreach ($state->lookUpNext([ExpressionToken::class]) as $expression) {
|
|
34
|
-
/** @var ExpressionNode $expressionNode */
|
|
35
|
-
$expressionNode = $state->createNode(ExpressionNode::class, $expression);
|
|
36
|
-
$expressionNode->check();
|
|
37
|
-
$expressionNode->unescape();
|
|
38
|
-
$expressionNode->setValue($expression->getValue());
|
|
39
|
-
$element->setName($expressionNode);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (!$state->expect([InterpolationEndToken::class])) {
|
|
43
|
-
$state->throwException(
|
|
44
|
-
'Interpolation not properly closed',
|
|
45
|
-
0,
|
|
46
|
-
$token
|
|
47
|
-
);
|
|
48
|
-
}
|
|
23
|
+
$this->handleExpressionTokens($token, $state);
|
|
49
24
|
|
|
50
25
|
return;
|
|
51
26
|
}
|
|
@@ -65,4 +40,28 @@ class InterpolationStartTokenHandler implements TokenHandlerInterface
|
|
|
65
40
|
|
|
66
41
|
$state->store();
|
|
67
42
|
}
|
|
43
|
+
|
|
44
|
+
private function handleExpressionTokens(InterpolationStartToken $token, State $state)
|
|
45
|
+
{
|
|
46
|
+
/** @var ElementNode $element */
|
|
47
|
+
$element = $state->createNode(ElementNode::class, $token);
|
|
48
|
+
$state->setCurrentNode($element);
|
|
49
|
+
|
|
50
|
+
foreach ($state->lookUpNext([ExpressionToken::class]) as $expression) {
|
|
51
|
+
/** @var ExpressionNode $expressionNode */
|
|
52
|
+
$expressionNode = $state->createNode(ExpressionNode::class, $expression);
|
|
53
|
+
$expressionNode->check();
|
|
54
|
+
$expressionNode->unescape();
|
|
55
|
+
$expressionNode->setValue($expression->getValue());
|
|
56
|
+
$element->setName($expressionNode);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!$state->expect([InterpolationEndToken::class])) {
|
|
60
|
+
$state->throwException(
|
|
61
|
+
'Interpolation not properly closed',
|
|
62
|
+
0,
|
|
63
|
+
$token
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
68
67
|
}
|