<commit_before>from cgum.basic import *

# Represents a C preprocessor statement
class PreprocessorStatement(Node):
    CODE = "450300"
    LABEL = "CppTop"

    def __init__(self, pos, length, label, children):
        assert label is None
        assert len(children) == 1
        super().__init__(pos, length, label, children)

    def statement(self):
        return self.__children[0]
    def to_s(self):
        return self.statement().to_s()

class OtherDirective(Node):
    CODE = "400400"
    LABEL = "OtherDirective"

    def __init__(self, pos, length, label, children):
        assert label is None
        assert len(children) == 1
        assert isinstance(children[0], GenericString)
        super().__init__(pos, length, label, children)

    def directive(self):
        return self.__children[0].to_s()
    def to_s(self):
        return self.directive()

class Define(Node):
    CODE = "400100"
    LABEL = "Define"

class DefineFunc(Node):
    CODE = "410100"
    LABEL = "DefineFunc"

class DefineExpr(Node):
    CODE = "420100"
    LABEL = "DefineExpr"
<commit_msg>added DefineVar<commit_after>from cgum.basic import *

# Represents a C preprocessor statement
class PreprocessorStatement(Node):
    CODE = "450300"
    LABEL = "CppTop"

    def __init__(self, pos, length, label, children):
        assert label is None
        assert len(children) == 1
        super().__init__(pos, length, label, children)

    def statement(self):
        return self.__children[0]
    def to_s(self):
        return self.statement().to_s()

class OtherDirective(Node):
    CODE = "400400"
    LABEL = "OtherDirective"

    def __init__(self, pos, length, label, children):
        assert label is None
        assert len(children) == 1
        assert isinstance(children[0], GenericString)
        super().__init__(pos, length, label, children)

    def directive(self):
        return self.__children[0].to_s()
    def to_s(self):
        return self.directive()

class Define(Node):
    CODE = "400100"
    LABEL = "Define"

class DefineFunc(Node):
    CODE = "410100"
    LABEL = "DefineFunc"

class DefineExpr(Node):
    CODE = "420100"
    LABEL = "DefineExpr"

class DefineVar(Node):
    CODE = "410001"
    LABEL = "DefineVar"

{'fraction_non_alphanumeric': 0.11452762923351159, 'fraction_numerical': 0.0338680926916221, 'mean_word_length': 2.945518453427065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3057556', 'n_tokens_mistral': 773, 'n_tokens_neox': 692, 'n_words': 189}