* Update indentation for PHP, JS, and TS.
Addresses https://github.com/microsoft/vscode/issues/136592
- For PHP, auto-indent after `if`, `elseif`, `else if`, `while`, `for` and `foreach`. This also fixes an issue where hitting Enter on a blank line below a single line `if` (or other) results in an extra tab.
- For PHP, extra dot after `*/` and blank line.
- For JS/TS, auto-indent for `else` to be consistent with handling of `if` statements
* polish
---------
Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
* wip
* polishing the code
* adding code
* adding the language
* reshuffling the code to avoid cyclic dependency
* polihsing code
* uncommenting tests
* also adopting the indentation rules within the reindentation operation
* using instead the sliced line tokens instead of the scoped line tokens
* polishing the code
* using start indices instead
* using value everywhere
* using the token data to type the tokens
* setting to number instead of standard token type
* using token data from autoindenttest.ts
* using same code in both test files
* placing instantiation service into the registerLanguage method
* copying object into the node js autoindent.ts
Fixes#201424
It wasn't matching closing parens, which resulted in these issues:
* Pressing enter with just a closing paren to the right of the caret
wouldn't result in a dedent on the next line
* With the caret at the start of the line below a line containing only a
closing paren, pressing tab would result in an extra level of
indentation