summaryrefslogblamecommitdiff
path: root/hscript/script_l.hh
blob: 1f048c6e4c2b90c9c5f485b18304dc5f23ce4f88 (plain) (tree)


































                                                                           
/*
 * script_l.hh - Definition of the ScriptLocation structure
 * libhscript, the HorizonScript library for
 * Project Horizon
 *
 * Copyright (c) 2020 Adélie Linux and contributors.  All rights reserved.
 * This code is licensed under the AGPL 3.0 license, as noted in the
 * LICENSE-code file in the root directory of this repository.
 *
 * SPDX-License-Identifier: AGPL-3.0-only
 */

#ifndef SCRIPT_L_HH
#define SCRIPT_L_HH

#include <string>

namespace Horizon {

/*! Defines a location within a script. */
struct ScriptLocation {
    /*! The filename of the script. */
    std::string name;
    /*! The line number of the current location. */
    int line;
    /*! Whether this script is nested or the original script. */
    bool nested;

    ScriptLocation(std::string _n, int _l, bool _nest = false) :
        name{_n}, line{_l}, nested{_nest} {};
};

}

#endif /* !SCRIPT_L_HH */