blob: e1becc831d8a0177926df559bd5c254f3faac28d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* 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 inherited or the original script. */
bool inherited;
ScriptLocation(std::string _n, int _l, bool _inherit = false) :
name{_n}, line{_l}, inherited{_inherit} {};
};
}
#endif /* !SCRIPT_L_HH */
|