summaryrefslogtreecommitdiff
path: root/hscript
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-05 20:38:14 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-05 20:38:14 -0500
commitc0512bf3c20c8849670b0cf577d8118976ec0697 (patch)
tree5bd9957e785627c409033a63d11f7d3e2dfc9c7b /hscript
parentbc708581a4f10872ec3f8bd037e791b6be5a550d (diff)
downloadhorizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.gz
horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.bz2
horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.xz
horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.zip
Tweak API
Diffstat (limited to 'hscript')
-rw-r--r--hscript/script.cc35
-rw-r--r--hscript/script.hh23
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;