Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12655255
PhutilJSONFragmentLexer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
646 B
Referenced Files
None
Subscribers
None
PhutilJSONFragmentLexer.php
View Options
<?php
/**
* Syntax highlighting lexer for JSON fragments.
*/
final
class
PhutilJSONFragmentLexer
extends
PhutilLexer
{
protected
function
getRawRules
()
{
return
array
(
'start'
=>
array
(
array
(
'"'
,
's'
,
'double-quoted-string'
),
array
(
'
\s
+'
,
null
),
array
(
'[
\\
[
\\
]{},:]'
,
'o'
),
array
(
'(?:true|false|null)'
,
'k'
),
array
(
'-?
\d
+(
\.\d
+([eE][-+]?
\d
+)?)?'
,
'mf'
),
array
(
'.'
,
null
),
),
'double-quoted-string'
=>
array
(
array
(
'[^"
\\\\
]+'
,
's'
),
array
(
'"'
,
's'
,
'!pop'
),
array
(
'
\\\\
u[0-9a-fA-F]{4}'
,
'k'
),
array
(
'
\\\\
.'
,
'k'
),
),
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 28, 15:02 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1050905
Default Alt Text
PhutilJSONFragmentLexer.php (646 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline
Log In to Comment