Pastebin

New pastes are no longer accepted · Stats

Latest Pastes

void Quest::Load(const std::string source)
{
    bool inmain = false;
    bool instate = false;

    bool inquotes = false;
    bool inparens = false;
    bool incomment = false;
    bool escape = false;
    bool semicolon = false;
    bool version_said = false;
    bool questname_said = false;
    char quotechar = '\0';

    int character = 0;

    int quote_start = 0;
    int quote_end = 0;

    int paren_start = 0;
    int paren_end = 0;

    int comment_start = 0;

    std::vector<int> args;

    State *state;
    Action *action;
    Rule *rule;

    std::string tempstring;

    while (source[character] != '\0')
    {
		if (inquotes && !incomment && !escape && source[character] = quotechar)
		{
			quote_end = tempstring.size();
			inquotes = false;
		}
        else if (!incomment && !escape && !inquotes && (source[character] == '\"' || source[character] == '\''))
        {
			quote_start = tempstring.size();
			inquotes = true;
			quotechar = source[character];
        }