Implement HHVM parsing for optional shape fields
commit38399ee81be2882bfa831b2e5c757f26658c26f5
authorMichael Tingley <tingley@fb.com>
Thu, 2 Mar 2017 19:06:54 +0000 (2 11:06 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 2 Mar 2017 19:27:50 +0000 (2 11:27 -0800)
treef3c6f32ef4bc92b044a68c126a3e1998da9b06a0
parenteeaf6308312a23a9c2ac345dfb60b6cd353ce60c
Implement HHVM parsing for optional shape fields

Summary: Introduces parsing into HHVM for optional shape fields. This diff is fairly uninteresting; a subsequent diff will integrate the use of this new property into the type structure for a shape field.

Reviewed By: paulbiss

Differential Revision: D4601736

fbshipit-source-id: ff05730d91d5a7e27b0d6a17c70edc6e511f05e3
17 files changed:
hphp/compiler/parser/parser.cpp
hphp/compiler/parser/parser.h
hphp/compiler/type_annotation.cpp
hphp/compiler/type_annotation.h
hphp/parser/hphp.5.tab.cpp
hphp/parser/hphp.7.tab.cpp
hphp/parser/hphp.y
hphp/runtime/ext/factparse/parser.cpp
hphp/runtime/ext/factparse/parser.h
hphp/test/slow/type_annotation/shape_typedef_with_multiple_optional_tokens.php [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_typedef_with_multiple_optional_tokens.php.expectf [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_typedef_with_optional_field.php [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_typedef_with_optional_field.php.expect [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_typedef_with_question_mark.php [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_typedef_with_question_mark.php.expectf [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_usage_with_optional_field.php [new file with mode: 0644]
hphp/test/slow/type_annotation/shape_usage_with_optional_field.php.expectf [new file with mode: 0644]