New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some updates to the PHP lexer #1397
Merged
Merged
Commits on Apr 4, 2020
-
* fix case insensitivity of (accordingly to the language):
+ `<?php` + keywords + function/method names * updates to the language: + support `_` in (binary, decimal, hexadecimal, ...) numbers (7.4.0) + support for binary numbers (`0b...`) (5.4.0) + Unicode codepoints escape syntax (`\u{...}`) (7.0.0) + add some missing keywords: * `fn` keyword (7.4.0) * type declarations (PHP 7, including `void` and nullable types from PHP 7.1) * 7.0.0: `class` (anonymous classes), `yield from` * 5.4.0: `callable`, `insteadof`, `trait`, `__TRAIT__` * 5.3.0: `goto`, `__NAMESPACE__`, `__DIR__` * others: casts, `instanceof`, `__CLASS__`, `__FUNCTION__`, `__METHOD__`, `__halt_compiler` * `self` even if it's not really a reserved word
Configuration menu - View commit details
-
Copy full SHA for 4a21ac0 - Browse repository at this point
Copy the full SHA 4a21ac0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 060295a - Browse repository at this point
Copy the full SHA 060295aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c64839 - Browse repository at this point
Copy the full SHA 0c64839View commit details -
Configuration menu - View commit details
-
Copy full SHA for 00911c6 - Browse repository at this point
Copy the full SHA 00911c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9090523 - Browse repository at this point
Copy the full SHA 9090523View commit details -
pull out
true
,false
andnull
from keywords:we already had a rule to handle their lower case form, just make it case insensitive.
Configuration menu - View commit details
-
Copy full SHA for f441f10 - Browse repository at this point
Copy the full SHA f441f10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d98e5a - Browse repository at this point
Copy the full SHA 2d98e5aView commit details -
* remove E_* and PHP_* constants: these are not keywords and are case sensitive (keywords are not) * `not` doesn't exist * neither `this` * `empty` should be treated in the same way as `isset` and `unset` (currently functions) * `virtual` is a function, not a keyword * `php_user_filter` is a class, not a keyword
Configuration menu - View commit details
-
Copy full SHA for ef6fc5e - Browse repository at this point
Copy the full SHA ef6fc5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2aa5634 - Browse repository at this point
Copy the full SHA 2aa5634View commit details -
Configuration menu - View commit details
-
Copy full SHA for 775cd71 - Browse repository at this point
Copy the full SHA 775cd71View commit details
Commits on Apr 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a12604d - Browse repository at this point
Copy the full SHA a12604dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca22a6c - Browse repository at this point
Copy the full SHA ca22a6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c80d72 - Browse repository at this point
Copy the full SHA 5c80d72View commit details -
Configuration menu - View commit details
-
Copy full SHA for c93f333 - Browse repository at this point
Copy the full SHA c93f333View commit details
Commits on Apr 6, 2020
-
fix tokenization of nullable types (eg
?int
): the rule handlingtypehinting should be placed before the one whith `?` and which recognizes, among others, operators like `?`, `??`, `??=`, ... In clear, `?int` is actually tokenized as: `['Operator', '?'], ['Keyword.Type', 'int']` Instead of: `['Keyword.Type', '?int']`
Configuration menu - View commit details
-
Copy full SHA for 67d3bb5 - Browse repository at this point
Copy the full SHA 67d3bb5View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.