Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
44million committed Dec 3, 2023
1 parent fb130ea commit ff5362a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/main/java/main/Runfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
import java.util.Objects;
import java.util.Scanner;

/*
Main file. Contains the CLI tool for Q.
/**
* {@code @Class} Runfile The main file which contains the CLI flags
*/

public class Runfile {

public static QFile mainFile;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/qlang/core/internal/CompilerFileTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Optional<String> tree(Path path) {
*/
private String directoryTree(File folder, List<Boolean> lastFolders) {
StringBuilder directory = new StringBuilder();
if (lastFolders.size() != 0)
if (!lastFolders.isEmpty())
directory.append(!(lastFolders.get(lastFolders.size() - 1)) ? "├─ " : "└─ ");
directory.append("/").append(folder.getName()).append("::Folder ").append(folderSize(folder));

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/qlang/core/internal/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public boolean getObj(String name) {
*/
public void destroy(String name) {
if (Util.getWebByName(name) != null) {
this.webs.remove(Util.getWebByName(name));
this.webs.remove(name);
} else if (Util.getWinByName(name) != null) {
this.wins.remove(Util.getWinByName(name));
} else if (this.files.containsKey(name)) {
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/qlang/core/internal/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int
}
});
parser.setBuildParseTree(true);
ParseTree tree = parser.parse();
return tree;
return parser.parse();
}

@NotNull
Expand All @@ -118,8 +117,7 @@ public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int
}
});
parser.setBuildParseTree(true);
ParseTree tree = parser.parse();
return tree;
return parser.parse();
}

public void setFile(File file) {
Expand Down

0 comments on commit ff5362a

Please sign in to comment.