diff --git a/src/lexer/PhutilTypeLexer.php b/src/lexer/PhutilTypeLexer.php --- a/src/lexer/PhutilTypeLexer.php +++ b/src/lexer/PhutilTypeLexer.php @@ -19,7 +19,7 @@ array('map', 'map'), array('list', 'list'), array('int|float|bool|string|null|callable|wild|regex', 'k'), - array('[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*', 'k'), + array('[\\\\a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*', 'k'), array('\\(', '(', 'comment'), ), 'comment' => array( diff --git a/src/parser/__tests__/PhutilTypeSpecTestCase.php b/src/parser/__tests__/PhutilTypeSpecTestCase.php --- a/src/parser/__tests__/PhutilTypeSpecTestCase.php +++ b/src/parser/__tests__/PhutilTypeSpecTestCase.php @@ -8,6 +8,7 @@ 'int|null', 'string', 'SomeClass', + 'Namespace\SomeClass', 'map', 'int | null', 'list < string >',