<commit_before>
//
// Copyright © 2017-present Kary Foundation, Inc. All rights reserved.
//   Author: <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//

namespace KaryScript.Compiler.AST {

    //
    // ─── LOCATION ───────────────────────────────────────────────────────────────────
    //

        export interface ILocation {
            start:  IPosition
            end:    IPosition
        }

        export interface IPosition {
            offset: number
            line:   number
            column: number
        }

    //
    // ─── BASE NODE ──────────────────────────────────────────────────────────────────
    //

        export interface IBase {
            type: "Root"
                | "Body"
                | "Empty"
                | "NumericLiteral"
                | "StringInterpolation"
                | "StringLiteral"
                | "BooleanLiteral"
                | "LineTerminator"
                | "ReservedValueLiterals"
                | "SingleAssignmentStatement"
                | "ShorthandIfExpression"
                | "ArrayLiteral"
                | "ObjectLiteral"
                | "Identifier"
                | "UnaryOperator"
                | "AddressIdentifier"
                | "Assignment"
                | "ReturnStatement"
                | "ClassDeclaration"
                | "FunctionDeclaration"
                | "DeclarationStatement"
                | "ArrayObjectIndexLoader"
                | "SpecialCommand"
                | "SExpression"
                | "ReturnKeyword"
                | "PipeExpression"
                | "LambdaExpression"
                | "WhileStatement"
                | "ForStatement"
                | "ElseIfStatement"
                | "SwitchStatement"
                | "IfStatement"
                | "PipePlaceholder"
                | "ArrayDeclaration"
                | "AwaitStatement"
                | "ObjectDeclaration"
                | "Predicate"
                | "DeclarationAssignment"
                | "StringPart"
                | "InlineComment"
                | "CaseStatement"
                | "Selector"
                | "EmptyCell"
                | "TableLiteral"
                | "SetLiteral"
                | "MapLiteral"
                | "TableRow"
                | "Octothorpe"
                | "HolderDeclarationStatement"
                | "HolderIdentifier"
                | "Comparison"
                | "ExpressionMember"
                | "UseStatement"
                | "TryCatchStatement"
                | "ZoneDeclaration"
                | "RegExpLiteral"
                | "ReservedIdentifiers"
                | "FunctionDeclaration"

            location: ILocation

            id: string
        }

    //
    // ─── RESERVED IDENTIFIERS ───────────────────────────────────────────────────────
    //

        export interface IReservedIdentifiers extends IBase {
            name:       string
        }

    //
    // ─── REGEXP LITERAL ─────────────────────────────────────────────────────────────
    //

        export interface IRegExpLiteral extends IBase {
            pattern:    string
            flags:      string
        }

    //
    // ─── ZONE DECLARATION ───────────────────────────────────────────────────────────
    //

        export interface IZoneDeclaration extends IBase {
            body:       IBody
            kind:       'named' | 'not-named'
        }

        export interface INamedZone extends IZoneDeclaration {
            kind:       'named'
            name:       IAddressIdentifier | IIdentifier
        }

        export interface ISimpleZone extends IZoneDeclaration {
            kind:       'not-named'
        }

    //
    // ─── TRY CATCH STATEMENT ────────────────────────────────────────────────────────
    //

        export interface ITryCatchStatement extends IBase {
            body:                 IBody
            exceptionIdentifier:  IIdentifier | null
            catchBody:            IBody | null
            finallyBody:          IBody | null
        }

    //
    // ─── USE STATEMENT ──────────────────────────────────────────────────────────────
    //

        export interface IUseStatement extends IBase {
            kind:           'from-origin' | 'simple' | 'use-as'
        }

        export interface IUseStatementSimpleImport extends IUseStatement {
            kind:           'simple'
            args:           IIdentifier[ ]
        }

        export interface IUseStatementFromOrigin extends IUseStatement {
            origin:         IIdentifier
            args:           IIdentifier[ ]
        }

        export interface IUseStatementUseAs extends IUseStatement {
            kind:           'use-as'
            originId:       IStringLiteral
            name:           IIdentifier
        }

    //
    // ─── LITERAL MEMBER CALL ────────────────────────────────────────────────────────
    //

        export interface IExpressionMember extends IBase {
            expr:           IBase
            member:         IAddressIdentifier | IIdentifier
        }

    //
    // ─── COMPARISON ─────────────────────────────────────────────────────────────────
    //
<commit_msg>that's it, I'm an moran<commit_after>
//
// Copyright © 2017-present Kary Foundation, Inc. All rights reserved.
//   Author: <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//

namespace KaryScript.Compiler.AST {

    //
    // ─── LOCATION ───────────────────────────────────────────────────────────────────
    //

        export interface ILocation {
            start:  IPosition
            end:    IPosition
        }

        export interface IPosition {
            offset: number
            line:   number
            column: number
        }

    //
    // ─── BASE NODE ──────────────────────────────────────────────────────────────────
    //

        export interface IBase {
            type: "Root"
                | "Body"
                | "Empty"
                | "NumericLiteral"
                | "StringInterpolation"
                | "StringLiteral"
                | "BooleanLiteral"
                | "LineTerminator"
                | "ReservedValueLiterals"
                | "SingleAssignmentStatement"
                | "ShorthandIfExpression"
                | "ArrayLiteral"
                | "ObjectLiteral"
                | "Identifier"
                | "UnaryOperator"
                | "AddressIdentifier"
                | "Assignment"
                | "ReturnStatement"
                | "ClassDeclaration"
                | "FunctionDeclaration"
                | "DeclarationStatement"
                | "ArrayObjectIndexLoader"
                | "SpecialCommand"
                | "SExpression"
                | "ReturnKeyword"
                | "PipeExpression"
                | "LambdaExpression"
                | "WhileStatement"
                | "ForStatement"
                | "ElseIfStatement"
                | "SwitchStatement"
                | "IfStatement"
                | "PipePlaceholder"
                | "ArrayDeclaration"
                | "AwaitStatement"
                | "ObjectDeclaration"
                | "Predicate"
                | "DeclarationAssignment"
                | "StringPart"
                | "InlineComment"
                | "CaseStatement"
                | "Selector"
                | "EmptyCell"
                | "TableLiteral"
                | "SetLiteral"
                | "MapLiteral"
                | "TableRow"
                | "Octothorpe"
                | "HolderDeclarationStatement"
                | "HolderIdentifier"
                | "Comparison"
                | "ExpressionMember"
                | "UseStatement"
                | "TryCatchStatement"
                | "ZoneDeclaration"
                | "RegExpLiteral"
                | "ReservedIdentifiers"
                | "FunctionDeclaration"

            location: ILocation

            id: string
        }

    //
    // ─── RESERVED IDENTIFIERS ───────────────────────────────────────────────────────
    //

        export interface IReservedIdentifiers extends IBase {
            name:       string
        }

    //
    // ─── REGEXP LITERAL ─────────────────────────────────────────────────────────────
    //

        export interface IRegExpLiteral extends IBase {
            pattern:    string
            flags:      string
        }

    //
    // ─── ZONE DECLARATION ───────────────────────────────────────────────────────────
    //

        export interface IZoneDeclaration extends IBase {
            body:       IBody
            kind:       'named' | 'not-named'
        }

        export interface INamedZone extends IZoneDeclaration {
            kind:       'named'
            name:       IAddressIdentifier | IIdentifier
        }

        export interface ISimpleZone extends IZoneDeclaration {
            kind:       'not-named'
        }

    //
    // ─── TRY CATCH STATEMENT ────────────────────────────────────────────────────────
    //

        export interface ITryCatchStatement extends IBase {
            body:                 IBody
            exceptionIdentifier:  IIdentifier | null
            catchBody:            IBody | null
            finallyBody:          IBody | null
        }

    //
    // ─── USE STATEMENT ──────────────────────────────────────────────────────────────
    //

        export interface IUseStatement extends IBase {
            kind:           'from-origin' | 'simple' | 'use-as'
        }

        export interface IUseStatementSimpleImport extends IUseStatement {
            kind:           'simple'
            args:           IIdentifier[ ]
        }

        export interface IUseStatementFromOrigin extends IUseStatement {
            origin:         IStringLiteral
            args:           IIdentifier[ ]
        }

        export interface IUseStatementUseAs extends IUseStatement {
            kind:           'use-as'
            originId:       IStringLiteral
            name:           IIdentifier
        }

    //
    // ─── LITERAL MEMBER CALL ────────────────────────────────────────────────────────
    //

        export interface IExpressionMember extends IBase {
            expr:           IBase
            member:         IAddressIdentifier | IIdentifier
        }

    //
    // ─── COMPARISON ─────────────────────────────────────────────────────────────────
    //

{'fraction_non_alphanumeric': 0.1741578218735579, 'fraction_numerical': 0.0014766958929395477, 'mean_word_length': 1.3459623295085517, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2118253', 'n_tokens_mistral': 3044, 'n_tokens_neox': 2490, 'n_words': 552}