<commit_before>﻿using System;

namespace IronAHK.Scripting
{
    partial class Parser
    {
        void MoveToEOL(string code, ref int i)
        {
            while (i < code.Length)
            {
                switch (code[i])
                {
                    case CR:
                        int n = i + 1;
                        if (n < code.Length && code[n] == LF)
                            i = n;
                        goto case LF;

                    case LF:
                        return;

                    default:
                        i++;
                        break;
                }
            }
        }

        bool IsContinuationLine(string code)
        {
            if (code.Length == 0)
                return false;

            switch (code[0])
            {
                case Divide:
                case BitOR:
                case Concatenate:
                case Equal:
                case TernaryA:
                case Multicast:
                case Not:
                case BitNOT:
                case BitXOR:
                case Address:
                case Less:
                case Greater:
                case Multiply:
                    return !(IsHotstringLabel(code) || IsHotkeyLabel(code));

                case Add:
                case Subtract:
                    if (1 < code.Length && code[1] == code[0])
                        return false;
                    if (code[0] == Add)
                        goto case Not;
                    return true;

                case TernaryB:
                    if (code.Length > 1 && code[1] == Equal)
                        return true;
                    return !(code.Length > 1 && !IsSpace(code[1]));
            }

            if (code.Length >= AndTxt.Length && code.Substring(0, AndTxt.Length).Equals(AndTxt, StringComparison.OrdinalIgnoreCase))
                return true;
            else if (code.Length >= OrTxt.Length && code.Substring(0, OrTxt.Length).Equals(OrTxt, StringComparison.OrdinalIgnoreCase))
                return true;

            return false;
        }
    }
}<commit_msg>Recognise - as a hotkey definition.<commit_after>﻿using System;

namespace IronAHK.Scripting
{
    partial class Parser
    {
        void MoveToEOL(string code, ref int i)
        {
            while (i < code.Length)
            {
                switch (code[i])
                {
                    case CR:
                        int n = i + 1;
                        if (n < code.Length && code[n] == LF)
                            i = n;
                        goto case LF;

                    case LF:
                        return;

                    default:
                        i++;
                        break;
                }
            }
        }

        bool IsContinuationLine(string code)
        {
            if (code.Length == 0)
                return false;

            switch (code[0])
            {
                case Divide:
                case BitOR:
                case Concatenate:
                case Equal:
                case TernaryA:
                case Multicast:
                case Not:
                case BitNOT:
                case BitXOR:
                case Address:
                case Less:
                case Greater:
                case Multiply:
                    return !(IsHotstringLabel(code) || IsHotkeyLabel(code));

                case Add:
                case Subtract:
                    if (1 < code.Length && code[1] == code[0])
                        return false;
                    goto case Not;

                case TernaryB:
                    if (code.Length > 1 && code[1] == Equal)
                        return true;
                    return !(code.Length > 1 && !IsSpace(code[1]));
            }

            if (code.Length >= AndTxt.Length && code.Substring(0, AndTxt.Length).Equals(AndTxt, StringComparison.OrdinalIgnoreCase))
                return true;
            else if (code.Length >= OrTxt.Length && code.Substring(0, OrTxt.Length).Equals(OrTxt, StringComparison.OrdinalIgnoreCase))
                return true;

            return false;
        }
    }
}
{'fraction_non_alphanumeric': 0.08268182895048566, 'fraction_numerical': 0.005922767116796968, 'mean_word_length': 0.8714539007092199, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '5424339', 'n_tokens_mistral': 1109, 'n_tokens_neox': 994, 'n_words': 259}