Skip to content

Commit

Permalink
Fix some bugs (#15) in prep for v1.0.4
Browse files Browse the repository at this point in the history
* Update develop from master (prep for v1.0.3) (#11)

* Fix potential operator precedence bug (#8)

* v1.0.2

* Update README.md

* Update develop (#12)

* Fix potential operator precedence bug (#8)

* v1.0.2

* Update README.md

* Revert "Update develop (#12)" (#13)

This reverts commit c6f5c2e.

* Fix a few bugs, move things around
  • Loading branch information
ArkinSolomon authored Jan 27, 2023
1 parent 6760412 commit b96ac99
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sakura Interpreter -- Java

<img src="https://img.shields.io/badge/Interpreter%20Version-1.0.3-red" /> <img src="https://img.shields.io/badge/Lang Version-0.1.0--beta.2-green" /> [![Tests](https://github.com/ArkinSolomon/sakura-interpreter-java/actions/workflows/test-all.yml/badge.svg)](https://github.com/ArkinSolomon/sakura-interpreter-java/actions/workflows/test-all.yml) [![javadoc](https://javadoc.io/badge2/net.arkinsolomon/sakurainterpreter/javadoc.svg)](https://javadoc.io/doc/net.arkinsolomon/sakurainterpreter)
<img src="https://img.shields.io/badge/Interpreter%20Version-1.0.4-red" /> <img src="https://img.shields.io/badge/Lang Version-0.1.0--beta.2-green" /> [![Tests](https://github.com/ArkinSolomon/sakura-interpreter-java/actions/workflows/test-all.yml/badge.svg)](https://github.com/ArkinSolomon/sakura-interpreter-java/actions/workflows/test-all.yml) [![javadoc](https://javadoc.io/badge2/net.arkinsolomon/sakurainterpreter/javadoc.svg)](https://javadoc.io/doc/net.arkinsolomon/sakurainterpreter)

Sakura Interpreter written in Java.

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.arkinsolomon</groupId>
<artifactId>sakurainterpreter</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<packaging>jar</packaging>

<name>Sakura Interpreter</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
public class SakuraInterpreter {

public static final String LANG_VERSION = "0.1.0-beta-2";
public static final String INTERPRETER_VERSION = "1.0.3";
public static final String INTERPRETER_VERSION = "1.0.4";

private final InterpreterOptions options;

Expand Down Expand Up @@ -173,8 +173,13 @@ private static InterpreterOptions parseConfig(File configFile) {
if (configObj.containsKey("root")) {
Object root = configObj.get("root");
if (!(root instanceof String))
throw new RuntimeException("If provided in the configuration file, \"root\" must be a string (which represents path to a file)");
opts.setExecutor((String) root);
throw new RuntimeException("If provided in the configuration file, \"root\" must be a string (which represents path to a directory)");

File rootFile = new File((String) root);

if (!rootFile.isDirectory())
throw new RuntimeException("If provided in the configuration file, \"root\" must be a path to a directory (a path to a file was provided)");
opts.setRoot(rootFile);
}

if (configObj.containsKey("allowRead")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
* either express or implied limitations under the License.
*/

package net.arkinsolomon.sakurainterpreter.functions;
package net.arkinsolomon.sakurainterpreter.execution;

import net.arkinsolomon.sakurainterpreter.exceptions.SakuraException;
import net.arkinsolomon.sakurainterpreter.execution.DataType;
import net.arkinsolomon.sakurainterpreter.execution.Iterable;
import net.arkinsolomon.sakurainterpreter.execution.Value;

/**
* An iterator for a certain range.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import net.arkinsolomon.sakurainterpreter.exceptions.SakuraException;
import net.arkinsolomon.sakurainterpreter.execution.DataType;
import net.arkinsolomon.sakurainterpreter.execution.RangeIterable;
import net.arkinsolomon.sakurainterpreter.execution.Value;

import java.util.List;
Expand Down

0 comments on commit b96ac99

Please sign in to comment.