Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65832773
PhutilTypeLexer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jun 6, 12:55
Size
778 B
Mime Type
text/x-php
Expires
Sat, Jun 8, 12:55 (2 d)
Engine
blob
Format
Raw Data
Handle
18134167
Attached To
rPHU libphutil
PhutilTypeLexer.php
View Options
<?php
/**
* Lexer for a simple type grammar. See @{class:PhutilTypeSpec} for a
* description.
*/
final
class
PhutilTypeLexer
extends
PhutilLexer
{
protected
function
getRawRules
()
{
return
array
(
'start'
=>
array
(
array
(
'
\s
+'
,
' '
),
array
(
'
\\
|'
,
'|'
),
array
(
'<'
,
'<'
),
array
(
'>'
,
'>'
),
array
(
','
,
','
),
array
(
'
\\
?'
,
'?'
),
array
(
'optional'
,
'opt'
),
array
(
'map'
,
'map'
),
array
(
'list'
,
'list'
),
array
(
'int|float|bool|string|null|callable|wild|regex'
,
'k'
),
array
(
'[a-zA-Z_
\x
7f-
\x
ff][a-zA-Z0-9_
\x
7f-
\x
ff]*'
,
'k'
),
array
(
'
\\
('
,
'('
,
'comment'
),
),
'comment'
=>
array
(
array
(
'
\\
)'
,
')'
,
'!pop'
),
array
(
'[^
\\
)]+'
,
'cm'
),
),
);
}
}
Event Timeline
Log In to Comment