diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-05 20:38:14 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-05 20:38:14 -0500 |
commit | c0512bf3c20c8849670b0cf577d8118976ec0697 (patch) | |
tree | 5bd9957e785627c409033a63d11f7d3e2dfc9c7b | |
parent | bc708581a4f10872ec3f8bd037e791b6be5a550d (diff) | |
download | horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.gz horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.bz2 horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.xz horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.zip |
Tweak API
-rw-r--r-- | hscript/script.cc | 35 | ||||
-rw-r--r-- | hscript/script.hh | 23 |
2 files changed, 51 insertions, 7 deletions
diff --git a/hscript/script.cc b/hscript/script.cc index e69de29..98c451d 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -0,0 +1,35 @@ +/* + * script.hh - Implementation of the Script class + * libhscript, the HorizonScript library for + * Project Horizon + * + * Copyright (c) 2019 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 + */ + +#include "script.hh" + +namespace Horizon { + +struct Script::ScriptPrivate { +}; + +Script::Script() { +} + +bool Script::load(std::string path) { +} + +bool Script::load(std::istream &stream) { +} + +bool Script::parse() { +} + +bool Script::validate() { +} + +} diff --git a/hscript/script.hh b/hscript/script.hh index 881c9d6..2abadd9 100644 --- a/hscript/script.hh +++ b/hscript/script.hh @@ -19,15 +19,24 @@ namespace Horizon { /*! Defines the Script class, which represents a HorizonScript. */ class Script { public: - /*! Load a HorizonScript from the specified path and attempt to parse. */ - Script(std::string path); - /*! Load a HorizonScript from the specified stream and attempt to parse. */ - Script(std::istream &stream); + /*! Initialise the Script class. */ + Script(); - /*! Determines if the HorizonScript parsed correctly. */ - bool isParsed(); + /*! Load a HorizonScript from the specified path. + * @param path The path to load from. + * @return true if the Script could be loaded; false otherwise. + */ + bool load(std::string path); + /*! Load a HorizonScript from the specified stream. + * @param stream The stream to load from. + * @return true if the Script could be loaded; false otherwise. + */ + bool load(std::istream &stream); + + /*! Parses the HorizonScript. */ + bool parse(); /*! Determines if the HorizonScript is valid. */ - bool isValid(); + bool validate(); private: struct ScriptPrivate; |