<commit_before>import ceylon.ast.core {
    FunctionDefinition,
    ValueDefinition,
    FunctionShortcutDefinition,
    ValueDeclaration,
    Node,
    WideningTransformer,
    LazySpecifier,
    Specifier,
    ValueGetterDefinition,
    ObjectDefinition,
    Statement,
    Specification,
    FunctionDeclaration,
    LazySpecification,
    ClassDefinition,
    ValueSpecification,
    ValueSetterDefinition,
    InterfaceDefinition
}

import com.vasileff.ceylon.dart.ast {
    DartVariableDeclarationStatement,
    DartAssignmentExpression,
    DartAssignmentOperator,
    DartExpressionStatement,
    DartStatement
}
import com.vasileff.ceylon.dart.nodeinfo {
    LazySpecificationInfo
}

"Similar to [[StatementTransformer]], but for translating children of class bodies where
 some declarations are class members and should not be re-declared in a dart constructor."
shared
class ClassStatementTransformer(CompilationContext ctx)
        extends BaseGenerator(ctx)
        satisfies WideningTransformer<[DartStatement*]> {

    shared actual
    DartStatement[] transformStatement(Statement that)
        =>  if (that is Specification && !that is ValueSpecification)
            then super.transformStatement(that)
            else that.transform(statementTransformer);

    "The value may be a class member. So:

     1. If this is a getter (has a LazySpecifier), ignore
     2. Otherwise, assign the value to the member (but don't declaration a new variable)
    "
    shared actual
    DartStatement[] transformValueDefinition(ValueDefinition that) {
        switch (definition = that.definition)
        case (is LazySpecifier) {
            return [];
        }
        case (is Specifier) {
            "A DartVariableDeclarationStatement that will be scrapped for parts."
            assert (is DartVariableDeclarationStatement declarationStatement
                =   that.transform(statementTransformer).first);

            value dartVariableDeclaration
                =   declarationStatement.variableList.variables.first;<commit_msg>ignore type aliases in classes for now<commit_after>import ceylon.ast.core {
    FunctionDefinition,
    ValueDefinition,
    FunctionShortcutDefinition,
    ValueDeclaration,
    Node,
    WideningTransformer,
    LazySpecifier,
    Specifier,
    ValueGetterDefinition,
    ObjectDefinition,
    Statement,
    Specification,
    TypeAliasDefinition,
    FunctionDeclaration,
    LazySpecification,
    ClassDefinition,
    ValueSpecification,
    ValueSetterDefinition,
    InterfaceDefinition
}

import com.vasileff.ceylon.dart.ast {
    DartVariableDeclarationStatement,
    DartAssignmentExpression,
    DartAssignmentOperator,
    DartExpressionStatement,
    DartStatement
}
import com.vasileff.ceylon.dart.nodeinfo {
    LazySpecificationInfo
}

"Similar to [[StatementTransformer]], but for translating children of class bodies where
 some declarations are class members and should not be re-declared in a dart constructor."
shared
class ClassStatementTransformer(CompilationContext ctx)
        extends BaseGenerator(ctx)
        satisfies WideningTransformer<[DartStatement*]> {

    shared actual
    DartStatement[] transformStatement(Statement that)
        =>  if (that is Specification && !that is ValueSpecification)
            then super.transformStatement(that)
            else that.transform(statementTransformer);

    "Ignore type aliases for now."
    shared actual
    [] transformTypeAliasDefinition(TypeAliasDefinition that)
        =>  [];

    "The value may be a class member. So:

     1. If this is a getter (has a LazySpecifier), ignore
     2. Otherwise, assign the value to the member (but don't declaration a new variable)
    "
    shared actual
    DartStatement[] transformValueDefinition(ValueDefinition that) {
        switch (definition = that.definition)
        case (is LazySpecifier) {
            return [];
        }
        case (is Specifier) {
            "A DartVariableDeclarationStatement that will be scrapped for parts."
            assert (is DartVariableDeclarationStatement declarationStatement
                =   that.transform(statementTransformer).first);

            value dartVariableDeclaration
                =   declarationStatement.variableList.variables.first;
{'fraction_non_alphanumeric': 0.061362575828278115, 'fraction_numerical': 0.0009332711152589828, 'mean_word_length': 3.215339233038348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '2020876', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1055, 'n_words': 299}