Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62391316
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
Sun, May 12, 21:14
Size
795 B
Mime Type
text/x-php
Expires
Tue, May 14, 21:14 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17617945
Attached To
rPHU libphutil
PhutilTypeLexer.php
View Options
<?php
/**
* Lexer for a simple type grammar. See @{class:PhutilTypeSpec} for a
* description.
*
* @group lexer
*/
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