Skip to content

Instantly share code, notes, and snippets.

@fredemmott
Created October 25, 2021 21:15
Show Gist options
  • Save fredemmott/e0f044a43a13059890aa4220e3610925 to your computer and use it in GitHub Desktop.
Save fredemmott/e0f044a43a13059890aa4220e3610925 to your computer and use it in GitHub Desktop.
Script:
declarations:
NodeList[4]:
0:
MarkupSection:
hashbang:
HashbangToken:
leading: NodeList[0]:
text: '#!/usr/bin/env hhvm'
trailing: NodeList[1]: 0: EndOfLine:
1:
NamespaceDeclaration:
header:
NamespaceDeclarationHeader:
keyword:
NamespaceToken:
leading:
NodeList[3]:
0: DelimitedComment:
1: EndOfLine:
2: EndOfLine:
text: 'namespace'
trailing: NodeList[1]: 0: WhiteSpace:
name:
QualifiedName:
parts:
NodeList[3]:
0:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'Facebook'
trailing: NodeList[0]:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'HHAST'
trailing: NodeList[0]:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
2:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: '__Private'
trailing: NodeList[0]:
body:
NamespaceEmptyBody:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
2:
FunctionDeclaration:
attribute_spec:
OldAttributeSpecification:
left_double_angle:
LessThanLessThanToken:
leading: NodeList[1]: 0: EndOfLine:
text: '<<'
trailing: NodeList[0]:
attributes:
NodeList[1]:
0:
ListItem:
item:
ConstructorCall:
type:
NameToken:
leading: NodeList[0]:
text: '__EntryPoint'
trailing: NodeList[0]:
right_double_angle:
GreaterThanGreaterThanToken:
leading: NodeList[0]:
text: '>>'
trailing: NodeList[1]: 0: EndOfLine:
declaration_header:
FunctionDeclarationHeader:
modifiers:
NodeList[1]:
0:
AsyncToken:
leading: NodeList[0]:
text: 'async'
trailing: NodeList[1]: 0: WhiteSpace:
keyword:
FunctionToken:
leading: NodeList[0]:
text: 'function'
trailing: NodeList[1]: 0: WhiteSpace:
name:
NameToken:
leading: NodeList[0]:
text: 'hhast_dump_main_async'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
colon:
ColonToken:
leading: NodeList[0]:
text: ':'
trailing: NodeList[1]: 0: WhiteSpace:
type:
GenericTypeSpecifier:
class_type:
NameToken:
leading: NodeList[0]:
text: 'Awaitable'
trailing: NodeList[0]:
argument_list:
TypeArguments:
left_angle:
LessThanToken:
leading: NodeList[0]:
text: '<'
trailing: NodeList[0]:
types:
NodeList[1]:
0:
ListItem:
item:
SimpleTypeSpecifier:
specifier:
NoreturnToken:
leading: NodeList[0]:
text: 'noreturn'
trailing: NodeList[0]:
right_angle:
GreaterThanToken:
leading: NodeList[0]:
text: '>'
trailing: NodeList[1]: 0: WhiteSpace:
body:
CompoundStatement:
left_brace:
LeftBraceToken:
leading: NodeList[0]:
text: '{'
trailing: NodeList[1]: 0: EndOfLine:
statements:
NodeList[6]:
0:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '$root'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'realpath'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[1]:
0:
ListItem:
item:
BinaryExpression:
left_operand:
NameExpression:
wrapped:
NameToken:
leading: NodeList[0]:
text: '__DIR__'
trailing: NodeList[0]:
operator:
DotToken:
leading: NodeList[0]:
text: '.'
trailing: NodeList[0]:
right_operand:
LiteralExpression:
expression:
SingleQuotedStringLiteralToken:
leading: NodeList[0]:
text: '\'/..\''
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
1:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '$found_autoloader'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
LiteralExpression:
expression:
BooleanLiteralToken:
leading: NodeList[0]:
text: 'false'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
2:
WhileStatement:
keyword:
WhileToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'while'
trailing: NodeList[1]: 0: WhiteSpace:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
condition:
LiteralExpression:
expression:
BooleanLiteralToken:
leading: NodeList[0]:
text: 'true'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[1]: 0: WhiteSpace:
body:
CompoundStatement:
left_brace:
LeftBraceToken:
leading: NodeList[0]:
text: '{'
trailing: NodeList[1]: 0: EndOfLine:
statements:
NodeList[6]:
0:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '$autoloader'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$root'
trailing: NodeList[0]:
operator:
DotToken:
leading: NodeList[0]:
text: '.'
trailing: NodeList[0]:
right_operand:
LiteralExpression:
expression:
SingleQuotedStringLiteralToken:
leading: NodeList[0]:
text: '\'/vendor/autoload.hack\''
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
1:
IfStatement:
keyword:
IfToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'if'
trailing: NodeList[1]: 0: WhiteSpace:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
condition:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'file_exists'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[1]:
0:
ListItem:
item:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$autoloader'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[1]: 0: WhiteSpace:
statement:
CompoundStatement:
left_brace:
LeftBraceToken:
leading: NodeList[0]:
text: '{'
trailing: NodeList[1]: 0: EndOfLine:
statements:
NodeList[4]:
0:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '$found_autoloader'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
LiteralExpression:
expression:
BooleanLiteralToken:
leading: NodeList[0]:
text: 'true'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
1:
ExpressionStatement:
expression:
InclusionExpression:
require:
Require_onceToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'require_once'
trailing: NodeList[0]:
filename:
ParenthesizedExpression:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
expression:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$autoloader'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
2:
ExpressionStatement:
expression:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[4]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'Facebook'
trailing: NodeList[0]:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
2:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'AutoloadMap'
trailing: NodeList[0]:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
3:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'initialize'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
3:
BreakStatement:
keyword:
BreakToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'break'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
right_brace:
RightBraceToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '}'
trailing: NodeList[1]: 0: EndOfLine:
2:
IfStatement:
keyword:
IfToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'if'
trailing: NodeList[1]: 0: WhiteSpace:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
condition:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$root'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualEqualEqualToken:
leading: NodeList[0]:
text: '==='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
LiteralExpression:
expression:
SingleQuotedStringLiteralToken:
leading: NodeList[0]:
text: '\'\''
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[1]: 0: WhiteSpace:
statement:
CompoundStatement:
left_brace:
LeftBraceToken:
leading: NodeList[0]:
text: '{'
trailing: NodeList[1]: 0: EndOfLine:
statements:
NodeList[1]:
0:
BreakStatement:
keyword:
BreakToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'break'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
right_brace:
RightBraceToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '}'
trailing: NodeList[1]: 0: EndOfLine:
3:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '$parts'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'explode'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[2]:
0:
ListItem:
item:
LiteralExpression:
expression:
SingleQuotedStringLiteralToken:
leading: NodeList[0]:
text: '\'/\''
trailing: NodeList[0]:
separator:
CommaToken:
leading: NodeList[0]:
text: ','
trailing: NodeList[1]: 0: WhiteSpace:
1:
ListItem:
item:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$root'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
4:
ExpressionStatement:
expression:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'array_pop'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[1]:
0:
ListItem:
item:
DecoratedExpression:
decorator:
InoutToken:
leading: NodeList[0]:
text: 'inout'
trailing: NodeList[1]: 0: WhiteSpace:
expression:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$parts'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
5:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '$root'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'implode'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[2]:
0:
ListItem:
item:
LiteralExpression:
expression:
SingleQuotedStringLiteralToken:
leading: NodeList[0]:
text: '\'/\''
trailing: NodeList[0]:
separator:
CommaToken:
leading: NodeList[0]:
text: ','
trailing: NodeList[1]: 0: WhiteSpace:
1:
ListItem:
item:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$parts'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
right_brace:
RightBraceToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '}'
trailing: NodeList[1]: 0: EndOfLine:
3:
IfStatement:
keyword:
IfToken:
leading:
NodeList[2]:
0: EndOfLine:
1: WhiteSpace:
text: 'if'
trailing: NodeList[1]: 0: WhiteSpace:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
condition:
PrefixUnaryExpression:
operator:
ExclamationToken:
leading: NodeList[0]:
text: '!'
trailing: NodeList[0]:
operand:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$found_autoloader'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[1]: 0: WhiteSpace:
statement:
CompoundStatement:
left_brace:
LeftBraceToken:
leading: NodeList[0]:
text: '{'
trailing: NodeList[1]: 0: EndOfLine:
statements:
NodeList[2]:
0:
ExpressionStatement:
expression:
FunctionCallExpression:
receiver:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'fprintf'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[2]:
0:
ListItem:
item:
NameExpression:
wrapped:
QualifiedName:
parts:
NodeList[2]:
0:
ListItem:
separator:
BackslashToken:
leading: NodeList[0]:
text: '\\'
trailing: NodeList[0]:
1:
ListItem:
item:
NameToken:
leading: NodeList[0]:
text: 'STDERR'
trailing: NodeList[0]:
separator:
CommaToken:
leading: NodeList[0]:
text: ','
trailing: NodeList[1]: 0: WhiteSpace:
1:
ListItem:
item:
LiteralExpression:
expression:
DoubleQuotedStringLiteralToken:
leading: NodeList[0]:
text: '"Failed to find autoloader.\\n"'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
1:
ExpressionStatement:
expression:
FunctionCallExpression:
receiver:
NameToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'exit'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[1]:
0:
ListItem:
item:
LiteralExpression:
expression:
DecimalLiteralToken:
leading: NodeList[0]:
text: '1'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
right_brace:
RightBraceToken:
leading: NodeList[1]: 0: WhiteSpace:
text: '}'
trailing: NodeList[1]: 0: EndOfLine:
4:
ExpressionStatement:
expression:
BinaryExpression:
left_operand:
VariableExpression:
expression:
VariableToken:
leading:
NodeList[2]:
0: EndOfLine:
1: WhiteSpace:
text: '$result'
trailing: NodeList[1]: 0: WhiteSpace:
operator:
EqualToken:
leading: NodeList[0]:
text: '='
trailing: NodeList[1]: 0: WhiteSpace:
right_operand:
PrefixUnaryExpression:
operator:
AwaitToken:
leading: NodeList[0]:
text: 'await'
trailing: NodeList[1]: 0: WhiteSpace:
operand:
FunctionCallExpression:
receiver:
ScopeResolutionExpression:
qualifier:
NameToken:
leading: NodeList[0]:
text: 'DumpCLI'
trailing: NodeList[0]:
operator:
ColonColonToken:
leading: NodeList[0]:
text: '::'
trailing: NodeList[0]:
name:
NameToken:
leading: NodeList[0]:
text: 'runAsync'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
5:
ExpressionStatement:
expression:
FunctionCallExpression:
receiver:
NameToken:
leading: NodeList[1]: 0: WhiteSpace:
text: 'exit'
trailing: NodeList[0]:
left_paren:
LeftParenToken:
leading: NodeList[0]:
text: '('
trailing: NodeList[0]:
argument_list:
NodeList[1]:
0:
ListItem:
item:
VariableExpression:
expression:
VariableToken:
leading: NodeList[0]:
text: '$result'
trailing: NodeList[0]:
right_paren:
RightParenToken:
leading: NodeList[0]:
text: ')'
trailing: NodeList[0]:
semicolon:
SemicolonToken:
leading: NodeList[0]:
text: ';'
trailing: NodeList[1]: 0: EndOfLine:
right_brace:
RightBraceToken:
leading: NodeList[0]:
text: '}'
trailing: NodeList[1]: 0: EndOfLine:
3:
EndOfFile:
token:
EndOfFileToken:
leading: NodeList[0]:
text: ''
trailing: NodeList[0]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment