Project: aptanastudio
Issue APSTUD-4897: The PHP parser should be improved to use the parse cache properly.
In PHP a problem collector is notified about errors during the parse and when the parse finishes, errors are reported, instead of working by adding problems found and later reporting them (after a parse). So, it does not work properly if it takes advantage of the parsing (because in this case, the actual parsing won't take place -- and thus the error report won't happen). Error reporting happens in: com.aptana.editor.php.internal.parser.PHPParser.parse(IParseState, WorkingParseResult) at the statement: ast.flushErrors(); Also, on revision afc72082e4ae14bedcc11a0c24053a45bdca5447, a cache with the 'last valid ast' was created inside the PHPParser, but this seems odd, as the parser will always return the last 'good' parse, but this is not correct in the following situation: 1. create 2 files (both with unrelated content but with errors) 2. close them 3. open one and fix the error 4. open the other one (already with the error): the php ast returned will be wrong as the one with the 'last good parse' will be returned This would also break the ParsingEngine cache if it was in place because the parser would have the wrong ast returned.
Story points: 20