diff --git a/.gitignore b/.gitignore index 67f0dc51..97b7377d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ phpunit* .phpunit.result.cache vendor/* composer.lock +/src/Lexer/ConfigfileLexer.php +/src/Lexer/TemplateLexer.php +/src/Parser/ConfigfileParser.php +/src/Parser/TemplateParser.php diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..38afdbf1 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +all: lexers parsers + +lexers: src/Lexer/ConfigfileLexer.php src/Lexer/TemplateLexer.php +parsers: src/Parser/ConfigfileParser.php src/Parser/TemplateParser.php + +src/Lexer/ConfigfileLexer.php: src/Lexer/ConfigfileLexer.plex + php ./utilities/make-lexer.php src/Lexer/ConfigfileLexer.plex src/Lexer/ConfigfileLexer.php + +src/Lexer/TemplateLexer.php: src/Lexer/TemplateLexer.plex + php ./utilities/make-lexer.php src/Lexer/TemplateLexer.plex src/Lexer/TemplateLexer.php + +src/Parser/ConfigfileParser.php: src/Parser/ConfigfileParser.y + php ./utilities/make-parser.php src/Parser/ConfigfileParser.y src/Parser/ConfigfileParser.php + +src/Parser/TemplateParser.php: src/Parser/TemplateParser.y + php ./utilities/make-parser.php src/Parser/TemplateParser.y src/Parser/TemplateParser.php + +clean: + rm -f src/Lexer/ConfigfileLexer.php src/Lexer/TemplateLexer.php src/Parser/ConfigfileParser.php src/Parser/TemplateParser.php \ No newline at end of file diff --git a/TODO.txt b/TODO.txt index c0b575d4..e7e61a8d 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,9 +1,7 @@ -- [ ] \Smarty\Cacheresource\Base::load generates classnames that are now invalid -- [ ] \Smarty\Resource\BasePlugin::load generates classnames that are now invalid -- [ ] consistent ConfigFile Configfile - +## Data, TemplateBase, Smarty, Template, Debug, DataObject mess: - [ ] review usages of ->_getSmartyObj and ->smarty: maybe change this so we can hide more - [ ] ->_objType and ->objMap - [ ] refactor _isTplObj, _isDataObj +- [ ] look for and remove @method and @property phpdoc tags + - [ ] remove `require_once` calls from tests/*, especially where they load files from the demo dir -- [ ] look for and remove @method and @property phpdoc tags \ No newline at end of file diff --git a/composer.json b/composer.json index e6cfafa9..df463a86 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,10 @@ "autoload": { "psr-4" : { "Smarty\\" : "src/" - } + }, + "files": [ + "src/functions.php" + ] }, "extra": { "branch-alias": { @@ -45,6 +48,12 @@ }, "require-dev": { "phpunit/phpunit": "^8.5 || ^7.5", - "smarty/smarty-lexer": "^3.1" - } + "smarty/smarty-lexer": "@dev" + }, + "repositories": [ + { + "type": "path", + "url": "../smarty-lexer/" + } + ] } diff --git a/plugins/modifiercompiler.count_characters.php b/plugins/modifiercompiler.count_characters.php deleted file mode 100644 index 78a0f50f..00000000 --- a/plugins/modifiercompiler.count_characters.php +++ /dev/null @@ -1,28 +0,0 @@ - "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", " "<\/", "