Tyson Andre
5256703431
Stop including non-php files in validation tests.
...
Noticed test failures for pgsql.phpunit.xml in the drupal project's test
files. (contains the substring ".php")
Also, do the matching on the path name, not on the object to string
conversion.
2017-09-19 20:30:31 -07:00
Rob Lourens
52cfb00cdb
Merge pull request #183 from TysonAndre/remove-unnecessary-reference
...
Remove an unnecessary reference from parameter.
2017-09-18 20:31:38 -07:00
Tyson Andre
0104e356bb
Remove an unnecessary reference from parameter.
...
The parameter isn't being modified, so having this is unexpected,
and passing params by reference is slower than passing by value.
The reference was part of the initial commit for src/Token.php
2017-09-18 20:22:54 -07:00
Rob Lourens
7acdeebf1d
Merge pull request #177 from TysonAndre/Node-parser-partial-nits
...
Fix incorrect PHPdoc for src/Parser.php, nit on property assignment
2017-09-18 14:03:09 -07:00
Tyson Andre
1f29666335
Fix incorrect PHPdoc for src/Parser.php, nit on property assignment
...
Clarify phpdoc of parseDelimitedList
Don't assign a DelimitedList to node->nameParts,
it's declared as an array.
(Has no side effects, this is overwritten afterwards unless nameParts was null)
2017-09-18 13:50:41 -07:00
Rob Lourens
da02e0687a
Merge pull request #176 from TysonAndre/Node-phpdoc-phan-nits
...
Make phpdoc of Node and its subclasses more accurate
2017-09-18 13:40:44 -07:00
Tyson Andre
3558e79432
Make phpdoc of Node and its subclasses more accurate
...
- Some node subclasses have `Token` (not an array) as `$this->children`
- Undefined variable in coalesce
- be more specific about getRoot()'s expected value.
- use string ...$classNames (same syntax as a real signature)
https://github.com/phpDocumentor/fig-standards/pull/87#r37054459
- EchoExpression has ExpressionList (no expressions would be invalid PHP)
2017-09-14 22:57:37 -07:00
Rob Lourens
5bfa8bbffa
Merge pull request #174 from TysonAndre/normalize-space
...
Normalize spaces in union types in comments ("A | B" -> "A|B")
2017-09-13 10:28:32 -07:00
Tyson Andre
2858366310
Normalize spaces in union types in comments ("A | B" -> "A|B")
...
Mentioned in discussion of
https://github.com/Microsoft/tolerant-php-parser/pull/136/files
Many IDEs and tools don't expect whitespace, and don't handle this.
So, they may act as if only the first type.
- https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types
is a proposal, and is vague about how whitespace is handled
outside `<>`
- https://github.com/phpDocumentor/phpDocumentor2/blob/develop/docs/references/phpdoc/tags/var.rst
is vague
- https://github.com/phpDocumentor/ReflectionDocBlock/blob/master/src/DocBlock/Tags/Var_.php
doesn't expect any whitespace after `@var`
Remove extra space between `@param` and `@return` union types
Fix DiagnosticsProvider phpdoc
2017-09-12 23:48:42 -07:00
Rob Lourens
c26f73270c
Merge pull request #172 from dantleech/class_like
...
Introduced ClassLike Interface
2017-09-08 13:57:18 -07:00
dantleech
1c9bff6fb4
Introduced ClassLike Interface
2017-09-08 22:15:38 +02:00
dantleech
3aaff2f5c7
Do not use method as argument for pass by reference on Token ( #170 )
2017-08-27 10:35:48 -07:00
Rob Lourens
1fd9de16e0
Merge pull request #168 from Microsoft/roblou/fixTemplateStringParse
...
Parse template strings correctly
2017-08-10 17:01:27 -07:00
Rob Lourens
b64f8c6d23
Fix template string variable parent
2017-08-10 15:51:29 -07:00
Rob Lourens
46dad53d1f
Remove unneeded earlier template string implementation
2017-08-10 14:26:55 -07:00
Rob Lourens
b55b9eefcd
Fix ${x} variable syntax
2017-08-10 11:42:17 -07:00
Rob Lourens
e40b820463
Parse template string variables, and the basic expressions that are allowed
2017-08-10 11:26:27 -07:00
Rob Lourens
5cff92320d
Fix tokenizer to tokenize T_NUM_STRING and T_VAR_NAME correctly
2017-08-08 17:23:02 -07:00
Rob Lourens
5549ff2edd
Merge pull request #167 from jens1o/jens1o-IFunctionLike
...
Add Functionlike interface
2017-08-07 14:49:54 -07:00
jens1o
27c7b774ff
Add Functionlike interface
...
Microsoft/tolerant-php-parser#162
2017-08-07 23:44:37 +02:00
Rob Lourens
450aba1e73
Merge pull request #160 from Petah/patch-1
...
Fix error
2017-07-16 21:51:03 -07:00
David Neilsen
9bc3d1cac1
Fix error
...
Fix error PHP Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, array given
2017-07-09 19:23:05 +12:00
Rob Lourens
c812b148e1
Merge pull request #157 from andwur/php72-count
...
Fix use of count() on a string value
2017-06-18 20:11:27 -07:00
Andrew Watts
bb15f0051a
Fix use of count() on a string value
...
This is no longer allowed in PHP 7.2, and is typically unwanted.
See https://wiki.php.net/rfc/counting_non_countables
2017-06-19 12:14:47 +09:30
Rob Lourens
4f44e8e418
Merge pull request #152 from Microsoft/roblourens-readme-fix
...
Fix CoC formatting
2017-06-13 10:40:02 -07:00
Rob Lourens
37d1f18e35
Fix CoC formatting
2017-06-13 10:39:34 -07:00
Rob Lourens
74854c6eb5
Merge pull request #151 from Microsoft/nullableTypes
...
Support nullable types
2017-06-12 20:09:39 -07:00
Rob Lourens
2cc3701de5
Fix #97 - add questionToken for parsing nullable types, update test baseline
2017-06-12 18:34:14 -07:00
Rob Lourens
96fca7638f
Merge pull request #150 from Microsoft/lexicalGrammarTestSetup
...
Fix LexicalGrammarTest when no expected tokens present
2017-06-12 18:07:34 -07:00
Rob Lourens
55c2a2bfb3
Make LexicalGrammarTest match ParserGrammarTest when a new test file is added
2017-06-12 18:06:10 -07:00
Rob Lourens
f536fc69d4
Merge pull request #149 from Microsoft/newStaticError
...
Fix #148 - parse `new static` without errors
2017-06-12 18:05:04 -07:00
Rob Lourens
c993bc6160
Fix #148 - parse `new static` without errors
2017-06-12 17:33:26 -07:00
Rob Lourens
403bc8e9a4
Merge pull request #147 from Microsoft/parseIncludeRequire
...
Fix #146 - include/require expression parsing
2017-06-12 17:20:35 -07:00
Rob Lourens
80d0cfe7f2
Fix #146
2017-06-12 17:08:39 -07:00
Rob Lourens
917b5e0862
Merge pull request #145 from Microsoft/searchExclude
...
Add support folders to search.exclude
2017-06-12 15:31:16 -07:00
Rob Lourens
b5aadb290a
Add support folders to search.exclude
2017-06-12 15:28:02 -07:00
Rob Lourens
4dfcdb454b
Merge pull request #136 from jens1o/jens1o-fix-var-annotations
...
fix var annotations
2017-06-12 14:16:17 -07:00
Rob Lourens
f9687e4922
Merge pull request #137 from jens1o/jens1o-improve-performance
...
break when token was found
2017-06-12 14:09:18 -07:00
jens1o
0e5493002c
break when token was found
2017-06-08 23:24:54 +02:00
jens1o
6ee49e988f
fix var annotations
2017-06-08 22:34:03 +02:00
Rob Lourens
44b19eac27
Merge pull request #135 from Microsoft/composerAuthor
...
Set roblourens as package author
2017-06-08 11:14:33 -07:00
Rob Lourens
009b4f2adf
Set myself as package author
2017-06-08 11:08:59 -07:00
Rob Lourens
c53bb35d09
Merge pull request #133 from Microsoft/updateComposer
...
Add php version requirement to prepare for publication
2017-06-07 18:17:31 -07:00
Rob Lourens
d8a73c92fe
Add php requirement to prepare for publication
2017-06-07 18:16:58 -07:00
Rob Lourens
08436fea33
Merge pull request #132 from Microsoft/fixGetEmptyName
...
Fix getName when name is empty - should return null, not false.
2017-06-07 17:39:07 -07:00
Rob Lourens
c54797da6c
Fix getName when name is empty - should return null, not false.
...
- Same fix as in Variable.php
2017-06-07 17:38:47 -07:00
Rob Lourens
0e05312d2d
Merge pull request #129 from Microsoft/support-php70
...
Support PHP 7.0
2017-05-24 21:10:34 -07:00
Rob Lourens
6538ac3310
Use both PHP 7.0 and 7.1 in Travis
2017-05-24 21:05:27 -07:00
Rob Lourens
a8eeeafcb7
Remove "public const" so this runs with PHP 7.0
2017-05-24 21:05:14 -07:00
Rob Lourens
6341d8c577
Merge pull request #127 from Microsoft/backslash-crash
...
Fix exception when parsing misplaced backslash - fix #125
2017-05-12 11:11:46 -07:00