Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hphp/hack/src/parser/core/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ where
acc.push(t);
return acc;
}
TriviaKind::FixMe | TriviaKind::IgnoreError => {
TriviaKind::FixMe | TriviaKind::IgnoreError | TriviaKind::DelimitedComment => {
return acc;
}
_ => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"elements":[
{
"kind":"markup_section",
"markup_hashbang":{"kind":"missing"},
"markup_suffix":{
"kind":"markup_suffix",
"markup_suffix_less_than_question":{
Expand All @@ -29,13 +30,9 @@
"offset":2,
"leading_width":0,
"width":2,
"trailing_width":20,
"trailing_width":1,
"leading":[],
"trailing":[
{"kind":"whitespace","text":" ","offset":4,"width":1},
{"kind":"delimited_comment","text":"/* stric strict */","offset":5,"width":18},
{"kind":"end_of_line","text":"\n","offset":23,"width":1}
],
"trailing":[{"kind":"whitespace","text":" ","offset":4,"width":1}],
"line_number":1
}
}
Expand All @@ -48,11 +45,14 @@
"token":{
"kind":"end_of_file",
"text":"",
"offset":24,
"leading_width":0,
"offset":5,
"leading_width":19,
"width":0,
"trailing_width":0,
"leading":[],
"leading":[
{"kind":"delimited_comment","text":"/* stric strict */","offset":5,"width":18},
{"kind":"end_of_line","text":"\n","offset":23,"width":1}
],
"trailing":[],
"line_number":2
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ $vec = Vector {
$baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar,
};

$vec = Vector {$foo /* foo */};
$vec = Vector {$foo /* foo */};
$vec = Vector {
$foo,
/* foo */
};
$vec = Vector {
$foo,
/* foo */
};

$vec = Vector {
$foo, // foo
Expand All @@ -43,10 +49,14 @@ $vec = Vector {
,
};

$vec =
Vector {/* leading comment */ $fooooooooooooooooo /* trailing comment */};
$vec =
Vector {/* leading comment */ $fooooooooooooooooo /* trailing comment */};
$vec = Vector {
/* leading comment */ $fooooooooooooooooo,
/* trailing comment */
};
$vec = Vector {
/* leading comment */ $fooooooooooooooooo,
/* trailing comment */
};

$vec = Vector {
/* leading comment */
Expand Down
8 changes: 4 additions & 4 deletions hphp/test/slow/parser/extension/shape_type_alias.php.expectf
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ dict(6) {
string(20) "// Float description"
}
["some_string"]=>
vec(4) {
vec(3) {
string(11) "// Multiple"
string(2) "//"
string(13) "// paragraphs"
}
["some_bool"]=>
vec(12) {
string(26) "/*

Another paragraph.*/"
}
["some_bool"]=>
vec(11) {
string(7) "// Long"
string(17) "/* long */"
string(13) "//description"
Expand Down