Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121325761
PhutilJSONFragmentLexer.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, Jul 10, 01:57
Size
646 B
Mime Type
text/x-php
Expires
Sat, Jul 12, 01:57 (2 d)
Engine
blob
Format
Raw Data
Handle
27310585
Attached To
rPHU libphutil
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'
),
),
);
}
}
Event Timeline
Log In to Comment