Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Hack keywords in PHP files should be understood as simple identifiers. For example: ``` class inout {} ``` The simplest way to do that is to have the lexer aware of what it is lexing: PHP or Hack. This is done using a - for now very small - `Lexer_env` module. The generated `Full_fidelity_token_kind` does the lexing of keywords in function `from_string`. We change the generator so that this function now accept an `is_hack` argument. We also change the `Full_fidelity_schema` so that developers now have to specify whether a given keyword is "hack_only" or "php_and_hack". Reviewed By: jamesjwu Differential Revision: D8735588 fbshipit-source-id: 06474fd994885dce3f1ea9fed695bf5ba7bfac33
- Loading branch information
1 parent
9db89dc
commit 16a8703
Showing
36 changed files
with
1,764 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.