Граф коммитов

29 Коммитов

Автор SHA1 Сообщение Дата
Sy Tran Dung 16c1c13bea
Update Overview.md 2023-05-30 23:31:03 +07:00
Sy Tran Dung 981d92be63
Update HowItWorks.md 2023-05-30 23:27:18 +07:00
Tyson Andre 465d02f146 v0.1.0: Raise minimum php version, change some AST representations
Raise the minimum php version from 7.0 to 7.2.
Depend on phpunit 8 for local development

Unify method names for Node and Token to getFullStartPosition and getStartPosition
(Consistently end public API methods with Position).
Avoid the need for callers to check if an object is a Node/Token before
calling a method.

Convert UnsetIntrinsicExpression to UnsetStatement - it can only be used
as a statement.

Unify previously split up lists into a single list in some AST node
properties (initially done that way for backward compatibility)

Clean up unnecessary special case for throw
- This continues to be parsed as an ExpressionStatement with the same
  precedence

Rename throwStatement to throwExpression in test file names.
2021-04-29 17:11:53 -04:00
Yanmii daa2368d82 GettingStarted: Update instructions to PHP 7.2
PHP 7.1 is no longer supported, and the project targets PHP 7.2 
according to .travis.yml
2020-05-04 22:08:56 +01:00
Yanmii 0decf169cc GettingStarted: Update composer instructions
Deprecation warning: require.Microsoft/tolerant-php-parser is invalid, 
it should not contain uppercase characters. Please use 
microsoft/tolerant-php-parser instead. Make sure you fix this as 
Composer 2.0 will error.
2020-05-04 22:00:30 +01:00
Rob Lourens ffeaf03e0a
Fix #288 2019-03-14 08:44:05 -07:00
Tyson Andre 40d1b6e8e6 Fix typos 2018-09-09 16:27:49 -04:00
Martin Tang 6d0ebb131c
Update Mac OS PHP installation instructions
The homebrew/php repository has been deprecated, and php formulae have been moved to [homebrew-core](https://github.com/Homebrew/homebrew-core)
2018-04-14 15:32:10 +01:00
Darío Hereñú eca28485da
Typo on #162 & 283 2018-03-18 00:39:15 -03:00
Tyson Andre 816ec34fb6 Fixes #189 : Fix parsing edge cases in yield statements
Update tests diagnostics and expected generated ASTs

For backwards compatibility, continue to make `yield from expr`
have an ArrayElement as a child node.

To maintain the invariant that all Nodes must have at least one child,
make $yieldExpression->arrayElement be null when parsing `yield;`

Aside: `yield &$a;` is (and should be)
parsed as the binary operator `(yield) & ($a)`.
This is surprising, but makes sense, being the only sane parse tree.

- Add a unit test that `yield & &$a;` is invalid.
  There is no way to parse that.

Verified with the PHP module nikic/php-ast

```php
var_export(ast_dump(
    ast\parse_code('<?php function test() { yield & $x; }', 50)
));
```
2018-02-24 23:20:41 -08:00
Rob Lourens 77579dfa1e Change GettingStarted to match README change with absolute require 2017-10-30 16:14:48 -07:00
Rob Lourens 27dc0bc559 Remove invariant 2017-05-05 17:42:20 -07:00
Rob Lourens b57d23d047 Update API docs 2017-05-05 17:26:55 -07:00
Sara Itani e1e4642441 Merge branch 'master' of https://github.com/Microsoft/tolerant-php-parser into lang-server 2017-05-05 09:53:35 -07:00
Fabien Villepinte a3c6731b20 put trivia back to the example and update with the actual result 2017-02-06 13:58:55 +01:00
Fabien Villepinte cd04afc57b update the name of methods in the example 2017-02-06 13:45:36 +01:00
Sara Itani 1a36553260 regenerate api docs, update syntax-visualizer vsix 2017-02-01 17:41:56 -08:00
Sara Itani 38572e04b3 Merge pull request #72 from decanus/enhancement/node-name
NodeKind Refactoring
2017-02-01 14:37:38 -08:00
Sara Itani 4a6d3363f8 rename Diagnostics->DiagnosticsProvider, update examples to use use-clause, add copyright header to parse.php 2017-02-01 13:46:13 -08:00
Sara Itani b670fc9f71 Merge pull request #74 from mousetraps/refactor-utilities
Refactor Utilities.php and write tests for Position helpers
2017-02-01 13:31:00 -08:00
Sara Itani 77bcd037b4 Refactor Utilities.php and write tests for Position helpers 2017-02-01 13:20:04 -08:00
Fabien Villepinte b72eeb63a3 fix minor errors 2017-02-01 10:21:12 +01:00
decanus eab8c70c2c
Removed getNodeKind, removed NodeKind 2017-02-01 08:01:12 +01:00
Sara Itani e620204600 #22 Add "vendor" top-level namespace 2017-01-29 15:09:47 -08:00
Sara Itani 2e0edb3bde clarify that api documentation is incomplete 2017-01-18 11:32:56 -08:00
Sara Itani fc3af94582 Update Overview.md 2017-01-16 23:08:49 -08:00
Sara Itani c90f4ec93a Update GettingStarted.md 2017-01-16 23:07:26 -08:00
Sara Itani b9b942df91 Merge branch 'master' of https://github.com/Microsoft/tolerant-php-parser 2017-01-16 23:02:46 -08:00
Sara Itani 3a1d85dddc create docs folder 2017-01-16 23:02:23 -08:00