Project

General

Profile

Actions

Task #76086

closed

TypoScript Parser: Consider to separate classes for TypoScript parser and syntax highlighting

Added by Elmar Hinz over 8 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-05-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Syntax highlighting is done by the same parser as the array building. This results in a large amount of if conditions to address the differences.

The code is harder to read and more difficult to maintain. There is likely an impact in performance and this is a critical part of the system.

I suggest to separate the TypoScript Parser and the Syntax Parser into separate classes. They address different concerns.

By fully focusing the given task, it becomes more easy to optimise it for speed.

In special the parser does recursive function calls for each nesting level of the identifier braces. While recursive function calls are elegant in style, a simple loop with a stack may be faster.

Syntax highlighting doesn't require a nesting parser at all.

Actions

Also available in: Atom PDF