<commit_before>#include "TypeScriptParser.h"

using namespace antlr4;

TypeScriptParserBase::TypeScriptParserBase(TokenStream *input) : Parser(input)
{
}

bool TypeScriptParserBase::p(std::string str)
{
    return prev(str);
}

bool TypeScriptParserBase::prev(std::string str)
{
    return _input->LT(-1)->getText() == str;
}

bool TypeScriptParserBase::n(std::string str)
{
    return next(str);
}

bool TypeScriptParserBase::next(std::string str)
{
    return _input->LT(1)->getText() == str;
}

bool TypeScriptParserBase::notLineTerminator()
{
    return !here(TypeScriptParser::LineTerminator);
}

bool TypeScriptParserBase::notOpenBraceAndNotFunction()
{
    int nextTokenType = _input->LT(1)->getType();
    return nextTokenType != TypeScriptParser::OpenBrace && nextTokenType != TypeScriptParser::Function;

}

bool TypeScriptParserBase::closeBrace()
{
    return _input->LT(1)->getType() == TypeScriptParser::CloseBrace;<commit_msg>typescript: cpp update to new symbols<commit_after>#include "TypeScriptParser.h"

using namespace antlr4;

TypeScriptParserBase::TypeScriptParserBase(TokenStream *input) : Parser(input)
{
}

bool TypeScriptParserBase::p(std::string str)
{
    return prev(str);
}

bool TypeScriptParserBase::prev(std::string str)
{
    return _input->LT(-1)->getText() == str;
}

bool TypeScriptParserBase::n(std::string str)
{
    return next(str);
}

bool TypeScriptParserBase::next(std::string str)
{
    return _input->LT(1)->getText() == str;
}

bool TypeScriptParserBase::notLineTerminator()
{
    return !here(TypeScriptParser::LineTerminator);
}

bool TypeScriptParserBase::notOpenBraceAndNotFunction()
{
    int nextTokenType = _input->LT(1)->getType();
    return nextTokenType != TypeScriptParser::OpenBrace && nextTokenType != TypeScriptParser::Function_;

}

bool TypeScriptParserBase::closeBrace()
{
    return _input->LT(1)->getType() == TypeScriptParser::CloseBrace;
{'fraction_non_alphanumeric': 0.14330708661417324, 'fraction_numerical': 0.005249343832020997, 'mean_word_length': 6.563492063492063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '3864962', 'n_tokens_mistral': 609, 'n_tokens_neox': 611, 'n_words': 102}