<commit_before>
          
   ESTREE  
          



VERSION ==>                       #Last commit 19/03/2017
                                  #JavaScript AST standard

any                               #NODE:
                                  #  - type STR
                                  #  - [loc] (position in source code):
                                  #     - [source STR]
                                  #     - start|end:
                                  #        - line NUM (1-indexed)
                                  #        - column NUM (0-indexed)
                                  #It is root type, abstract:
                                  #  - all other types inherit from it
                                  #  - all redefine type STR, except if abstract types themselves

FILE                              #PROGRAM, type 'Program':
                                  #  - sourceType 'script|module'
                                  #  - body STATEMENT|MODULE_DECLARATION_ARR
STATEMENT                         #

EXPR_STATEMENT                    #Statement with single EXPR.
                                  #Child of STATEMENT, type 'ExpressionStatement':
                                  #  - expression EXPRESSION
;                                 #Empty statement, with only semicolon
                                  #Child of STATEMENT, type 'EmptyStatement'
{...}                             #Child of STATEMENT, type 'BlockStatement':
                                  #  - body STATEMENT_ARR

if (...) {...} [else {...}]       #Child of STATEMENT, type 'IfStatement':
                                  #  - test EXPRESSION
                                  #  - consequent STATEMENT
                                  #  - alternate STATEMENT|null
switch (...) {...}                #Child of STATEMENT, type 'SwitchStatement':
                                  #  - discriminant EXPRESSION
                                  #  - cases SWITCHCASE_ARR (type 'SwitchCase'):
                                  #     - test EXPRESSION (case's VAL) or null (default case)
                                  #     - consequent STATEMENT_ARR (if two following cases, the first one has no consequent)

while (...) {...}                 #Child of STATEMENT, type 'WhileStatement':
                                  #  - test EXPRESSION
                                  #  - body STATEMENT
do {...} while (...)              #Child of STATEMENT, type 'DoWhileStatement':
                                  #  - test EXPRESSION
                                  #  - body STATEMENT
for (...;...;...) {...}           #Child of STATEMENT, type 'ForStatement':
                                  #  - init VARIABLEDECLARATION|EXPRESSION|null
                                  #  - test EXPRESSION|null
                                  #  - update EXPRESSION|null
                                  #  - body STATEMENT
for (VAR in|of VAL) {...}         #Child of STATEMENT, type 'ForInStatement|ForOfStatement':
                                  #  - left VARIABLEDECLARATION|PATTERN
                                  #  - right EXPRESSION
                                  #  - body STATEMENT
break [LABEL]                     #Child of STATEMENT, type 'BreakStatement':
                                  #  - label IDENFIFIER|null
continue [LABEL]                  #Child of STATEMENT, type 'ContinueStatement':
                                  #  - label IDENFIFIER|null

with (...) {...}                  #Child of STATEMENT, type 'WithStatement':
                                  #  - object EXPRESSION
                                  #  - body STATEMENT
LABEL: ...                        #Child of STATEMENT, type 'LabeledStatement':
                                  #  - label IDENTIFIER
                                  #  - body STATEMENT

try { ... }                       #Child of STATEMENT, type 'TryStatement':
[catch (...) {...}]               #  - block BLOCKSTATEMENT
[finally {...}]                   #  - handler CATCHCLAUSE|null (type 'CatchClause'):
                                  #     - param PATTERN
                                  #     - body BLOCKSTATEMENT
                                  #  - finalizer BLOCKSTATEMENT|null
throw VAL                         #Child of STATEMENT, type 'ThrowStatement':
                                  #  - argument EXPRESSION

debugger                          #Child of STATEMENT, type 'DebuggerStatement'

DECLARATION                       #Child of STATEMENT
QUAL VAR = VAL, ...               #Child of DECLARATION, type 'VariableDeclaration':
                                  #  - declarations VARIABLEDECLARATOR_ARR (type 'VariableDeclarator'):
                                  #     - id PATTERN
                                  #     - init EXPRESSION|null
                                  #  - kind 'var|let|const'

EXPR                              #EXPRESSION
STR|BOOL|NUM|null|REGEXP          #LITERAL, child of EXPRESSION, type 'Literal':
                                  #  - value STR|BOOL|NUM|null|REGEXP
                                  #  (REGEXP only)
                                  #  - regex:
                                  #     - pattern STR
                                  #     - flags STR

super                             #Type 'Super'
this                              #Child of EXPRESSION, type 'ThisExpression'

[VAL...]                          #Child of EXPRESSION, type 'ArrayExpression':
                                  #  - elements EXPRESSION2|SPREADELEMENT_ARR (null for sparse ARR elements)
...ARR                            #Type 'SpreadElement':
                                  #  - argument EXPRESSION

{VAR[: VAL], ...}                 #Child of EXPRESSION, type 'ObjectExpression':
{[VAL]: VAL}                      #  - properties PROPERTY_ARR (type 'Property'):
{FUNC(...){...}}                  #     - key EXPRESSION (LITERAL if {[VAR]: VAL} or {NUM: VAL})
                                  #     - value EXPRESSION
                                  #     - kind 'init|get|set' (get|set are for getters|setters)
                                  #     - method BOOL (if FUNC)
                                  #     - shorthand BOOL (if { VAR })
                                  #     - computed BOOL

VAR                               #PATTERN
VAR                               #IDENTIFIER, child of EXPRESSION+PATTERN, type 'Identifier':
                                  #  - name STR
OBJ.VAR                           #Child of EXPRESSION+PATTERN, type 'MemberExpression':
OBJ[VAL]                          #  - object EXPRESSION|SUPER (OBJ)
                                  #  - property EXPRESSION (VAL) or IDENTIFIER (VAR)
                                  #  - computed true (VAL) or false (VAR)

FUNC                              #FUNCTION:
                                  #  - id IDENTIFIER (null if anonymous)
                                  #  - params PATTERN_ARR
                                  #  - body BLOCK_STATEMENT
                                  #  - generator BOOL
function [*]FUNC(...){...}        #Child of FUNCTION+DECLARATION, type 'FunctionDeclaration'
function [*][FUNC](...){...}      #Child of FUNCTION+EXPRESSION, type 'FunctionExpression'
return [VAL]                      #Child of STATEMENT, type 'ReturnStatement':
                                  #  - argument EXPRESSION|null
FUNC(...)                         #Child of EXPRESSION, type 'CallExpression':
                                  #  - callee EXPRESSION|SUPER (FUNC)
                                  #  - arguments EXPRESSION|SPREADELEMENT_ARR
new FUNC(...)                     #Child of EXPRESSION, type 'NewExpression':
                                  #  - callee EXPRESSION (FUNC)
                                  #  - arguments EXPRESSION|SPREADELEMENT_ARR

-VAL
+VAL
!VAL
~VAL                              #Child of EXPRESSION, type 'UnaryExpression':
typeof VAL                        #  - operator '-|+|!|~|typeof|void|delete'
void VAL                          #  - prefix BOOL (whether before VAL, i.e. always true)
delete VAL                        #  - argument EXPRESSION

++VAR                             #Child of EXPRESSION, type 'UpdateExpression':
VAR++                             #  - operator '--|++'
--VAR                             #  - prefix BOOL
VAR--                             #  - argument EXPRESSION

VAL == != === !== < <= > >= <<    #Child of EXPRESSION, type 'BinaryExpression':
>> >>> + - * / % | ^ & in         #  - operator '==|!=|===|!==|<|<=|>|>=|<<|>>|>>>|+|-|*|/|%|||^|&|in|instanceof'
instanceof VAL2                   #  - left EXPRESSION
                                  #  - right EXPRESSION
VAR = += -= *= /= %= <<= >>=      #Child of EXPRESSION, type 'AssignmentExpression':
>>>= |= ^= &= VAL                 #  - operator '=|+=|-=|*=|/=|%=|<<=|>>=|>>>=||=|^=|&='
                                  #  - left PATTERN or (only on older JavaScript engines) EXPRESSION
                                  #  - right EXPRESSION
VAL || && VAL2                    #Child of EXPRESSION, type 'LogicialExpression':
                                  #  - operator '|||&&'
                                  #  - left EXPRESSION
                                  #  - right EXPRESSION

VAL ? VAL2 : VAL3                 #Child of EXPRESSION, type 'ConditionalExpression':
                                  #  - test EXPRESSION
                                  #  - alternate EXPRESSION
                                  #  - consequent EXPRESSION
VAL,...                           #Child of EXPRESSION, type 'SequenceExpression':
                                  #  - expressions EXPRESSION_ARR<commit_msg>no commit message<commit_after>
          
   ESTREE  
          



TODO:
  - go through ESTree spec
  - try with online parser everything documented here, to see if there is more in output
  - go through JavaScript doc to see if something is missing


VERSION ==>                       #Last commit 19/03/2017
                                  #JavaScript AST standard

any                               #NODE:
                                  #  - type STR
                                  #  - [loc] (position in source code):
                                  #     - [source STR]
                                  #     - start|end:
                                  #        - line NUM (1-indexed)
                                  #        - column NUM (0-indexed)
                                  #It is root type, abstract:
                                  #  - all other types inherit from it
                                  #  - all redefine type STR, except if abstract types themselves

FILE                              #PROGRAM, type 'Program':
                                  #  - sourceType 'script|module'
                                  #  - body STATEMENT|MODULE_DECLARATION_ARR
STATEMENT                         #

EXPR_STATEMENT                    #Statement with single EXPR.
                                  #Child of STATEMENT, type 'ExpressionStatement':
                                  #  - expression EXPRESSION
;                                 #Empty statement, with only semicolon
                                  #Child of STATEMENT, type 'EmptyStatement'
{...}                             #Child of STATEMENT, type 'BlockStatement':
                                  #  - body STATEMENT_ARR

if (...) {...} [else {...}]       #Child of STATEMENT, type 'IfStatement':
                                  #  - test EXPRESSION
                                  #  - consequent STATEMENT
                                  #  - alternate STATEMENT|null
switch (...) {...}                #Child of STATEMENT, type 'SwitchStatement':
                                  #  - discriminant EXPRESSION
                                  #  - cases SWITCHCASE_ARR (type 'SwitchCase'):
                                  #     - test EXPRESSION (case's VAL) or null (default case)
                                  #     - consequent STATEMENT_ARR (if two following cases, the first one has no consequent)

while (...) {...}                 #Child of STATEMENT, type 'WhileStatement':
                                  #  - test EXPRESSION
                                  #  - body STATEMENT
do {...} while (...)              #Child of STATEMENT, type 'DoWhileStatement':
                                  #  - test EXPRESSION
                                  #  - body STATEMENT
for (...;...;...) {...}           #Child of STATEMENT, type 'ForStatement':
                                  #  - init VARIABLEDECLARATION|EXPRESSION|null
                                  #  - test EXPRESSION|null
                                  #  - update EXPRESSION|null
                                  #  - body STATEMENT
for (VAR in|of VAL) {...}         #Child of STATEMENT, type 'ForInStatement|ForOfStatement':
                                  #  - left VARIABLEDECLARATION|PATTERN
                                  #  - right EXPRESSION
                                  #  - body STATEMENT
break [LABEL]                     #Child of STATEMENT, type 'BreakStatement':
                                  #  - label IDENFIFIER|null
continue [LABEL]                  #Child of STATEMENT, type 'ContinueStatement':
                                  #  - label IDENFIFIER|null

with (...) {...}                  #Child of STATEMENT, type 'WithStatement':
                                  #  - object EXPRESSION
                                  #  - body STATEMENT
LABEL: ...                        #Child of STATEMENT, type 'LabeledStatement':
                                  #  - label IDENTIFIER
                                  #  - body STATEMENT

try { ... }                       #Child of STATEMENT, type 'TryStatement':
[catch (...) {...}]               #  - block BLOCKSTATEMENT
[finally {...}]                   #  - handler CATCHCLAUSE|null (type 'CatchClause'):
                                  #     - param PATTERN
                                  #     - body BLOCKSTATEMENT
                                  #  - finalizer BLOCKSTATEMENT|null
throw VAL                         #Child of STATEMENT, type 'ThrowStatement':
                                  #  - argument EXPRESSION

debugger                          #Child of STATEMENT, type 'DebuggerStatement'

DECLARATION                       #Child of STATEMENT
QUAL VAR = VAL, ...               #Child of DECLARATION, type 'VariableDeclaration':
                                  #  - declarations VARIABLEDECLARATOR_ARR (type 'VariableDeclarator'):
                                  #     - id PATTERN
                                  #     - init EXPRESSION|null
                                  #  - kind 'var|let|const'

EXPR                              #EXPRESSION

super                             #Type 'Super'
this                              #Child of EXPRESSION, type 'ThisExpression'

[VAL...]                          #Child of EXPRESSION, type 'ArrayExpression':
                                  #  - elements EXPRESSION2|SPREADELEMENT_ARR (null for sparse ARR elements)
...ARR                            #Type 'SpreadElement':
                                  #  - argument EXPRESSION

{VAR[: VAL], ...}                 #Child of EXPRESSION, type 'ObjectExpression':
{[VAL]: VAL}                      #  - properties PROPERTY_ARR (type 'Property'):
{FUNC(...){...}}                  #     - key EXPRESSION (LITERAL if {[VAR]: VAL} or {NUM: VAL})
                                  #     - value EXPRESSION
                                  #     - kind 'init|get|set' (get|set are for getters|setters)
                                  #     - method BOOL (if FUNC)
                                  #     - shorthand BOOL (if { VAR })
                                  #     - computed BOOL

VAR or related                    #PATTERN
VAR                               #IDENTIFIER, child of EXPRESSION+PATTERN, type 'Identifier':
                                  #  - name STR
OBJ.VAR                           #Child of EXPRESSION+PATTERN, type 'MemberExpression':
OBJ[VAL]                          #  - object EXPRESSION|SUPER (OBJ)
                                  #  - property EXPRESSION (VAL) or IDENTIFIER (VAR)
                                  #  - computed true (VAL) or false (VAR)
[VAR,...]                         #Child of PATTERN, type 'ArrayPattern' (deconstruction):
                                  #  - elements PATTERN_ARR (null for parse array element)
{VAR,...}                         #Child of PATTERN, type 'ObjectPattern' (deconstruction):
                                  #  - properties ASSIGNMENT_PROPERTY_ARR, child of PROPERTY with differences:
                                  #     - value PATTERN
                                  #     - kind always 'init'
                                  #     - method always false
...VARIADIC_ARG                   #Child of PATTERN, type 'RestElement':
                                  #  - argument PATTERN

FUNC                              #FUNCTION:
                                  #  - id IDENTIFIER (null if anonymous)
                                  #  - params PATTERN_ARR
                                  #  - body BLOCK_STATEMENT
                                  #  - generator BOOL
function [*]FUNC(...){...}        #Child of FUNCTION+DECLARATION, type 'FunctionDeclaration'
function [*][FUNC](...){...}      #FUNCTIONEXPR. Child of FUNCTION+EXPRESSION, type 'FunctionExpression'
[FUNC]() => {...}                 #Child of FUNCTION+EXPRESSION, type 'ArrowFunctionExpression':
                                  #  - no id
                                  #  - params PATTERN_ARR
                                  #  - body BLOCK_STATEMENT or (if () => VAL) EXPRESSION
                                  #  - no generator
                                  #  - expression BOOL (if () => VAL)
VAR = VAL                         #Child of PATTERN, type 'AssignmentPattern' (default values):
                                  #  - left PATTERN
                                  #  - right EXPRESSION
return [VAL]                      #Child of STATEMENT, type 'ReturnStatement':
                                  #  - argument EXPRESSION|null
yield [*] [VAL]                   #Child of EXPRESSION, type 'YieldExpression':
                                  #  - argument EXPRESSION|null
                                  #  - delegate BOOL (if *)
FUNC(...)                         #Child of EXPRESSION, type 'CallExpression':
                                  #  - callee EXPRESSION|SUPER (FUNC)
                                  #  - arguments EXPRESSION|SPREADELEMENT_ARR
new FUNC(...)                     #Child of EXPRESSION, type 'NewExpression':
                                  #  - callee EXPRESSION (FUNC)
                                  #  - arguments EXPRESSION|SPREADELEMENT_ARR

-VAL
+VAL
!VAL
~VAL                              #Child of EXPRESSION, type 'UnaryExpression':
typeof VAL                        #  - operator '-|+|!|~|typeof|void|delete'
void VAL                          #  - prefix BOOL (whether before VAL, i.e. always true)
delete VAL                        #  - argument EXPRESSION

++VAR                             #Child of EXPRESSION, type 'UpdateExpression':
VAR++                             #  - operator '--|++'
--VAR                             #  - prefix BOOL
VAR--                             #  - argument EXPRESSION

VAL == != === !== < <= > >= <<    #Child of EXPRESSION, type 'BinaryExpression':
>> >>> + - * / % | ^ & in         #  - operator '==|!=|===|!==|<|<=|>|>=|<<|>>|>>>|+|-|*|/|%|||^|&|in|instanceof'
instanceof VAL2                   #  - left EXPRESSION
                                  #  - right EXPRESSION
VAR = += -= *= /= %= <<= >>=      #Child of EXPRESSION, type 'AssignmentExpression':
>>>= |= ^= &= VAL                 #  - operator '=|+=|-=|*=|/=|%=|<<=|>>=|>>>=||=|^=|&='
                                  #  - left PATTERN or (only on older JavaScript engines) EXPRESSION
                                  #  - right EXPRESSION
VAL || && VAL2                    #Child of EXPRESSION, type 'LogicialExpression':
                                  #  - operator '|||&&'
                                  #  - left EXPRESSION
                                  #  - right EXPRESSION

VAL ? VAL2 : VAL3                 #Child of EXPRESSION, type 'ConditionalExpression':
                                  #  - test EXPRESSION
                                  #  - alternate EXPRESSION
                                  #  - consequent EXPRESSION
VAL,...                           #Child of EXPRESSION, type 'SequenceExpression':
                                  #  - expressions EXPRESSION_ARR

STR|BOOL|NUM|null|REGEXP          #LITERAL, child of EXPRESSION, type 'Literal':
                                  #  - value STR|BOOL|NUM|null|REGEXP
                                  #  (REGEXP only)
                                  #  - regex:
                                  #     - pattern STR
                                  #     - flags STR
TAG`...`                          #Child of EXPRESSION, type 'TaggedTemplateExpression':
                                  #  - tag EXPRESSION
                                  #  - quasi TEMPLATELITERAL
`...`                             #TEMPLATELITERAL. Child of EXPRESSION, type 'TemplateLiteral':
                                  #  - quasis TEMPLATE_ELEMENT_ARR (non-${} parts), type 'TemplateElement':
                                  #     - tail BOOL (if last one, including empty "" if ends with ${})
                                  #     - value: cooked|raw STR
                                  #  - expressions EXPRESSION_ARR (${} parts)

class [CLASS] [extends PARENT] {  #CLASS Type 'Class':
  [static] FUNC(...) {...}        #  - id IDENTIFIER|null
}                                 #  - superclass EXPRESSION|null
                                  #  - body CLASS_BODY, type 'ClassBody':
                                  #     - body METHOD_DEFINITION_ARR, type 'MethodDefinition':
                                  #        - key EXPRESSION
                                  #        - value FUNCTIONEXPR
                                  #        - kind 'constructor|method|get|set'
                                  #        - static BOOL
                                  #        - computed BOOL
class CLASS ... {}                #Child of CLASS+DECLARATION, type 'ClassDeclaration'
class [CLASS] ... {}              #Child of CLASS+EXPRESSION, type 'ClassExpression'
new.target                        #Child of EXPRESSION, type 'MetaProperty':
                                  #  - meta IDENTIFIER (new)
                                  #  - property IDENTIFIER (target)
{'fraction_non_alphanumeric': 0.11864835257436589, 'fraction_numerical': 0.0012640094379371366, 'mean_word_length': 0.9443761776030146, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 56, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 291, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4673244', 'n_tokens_mistral': 7648, 'n_tokens_neox': 7071, 'n_words': 1356}