summaryrefslogtreecommitdiff
path: root/src/ParseAll.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ParseAll.java')
-rw-r--r--src/ParseAll.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/ParseAll.java b/src/ParseAll.java
index 2662a85..568c89c 100644
--- a/src/ParseAll.java
+++ b/src/ParseAll.java
@@ -22,7 +22,7 @@ public class ParseAll {
// fileStr = "./progs/wrong.py";
try {
- if (!file.isFile() || !getExtension(file.getName()).equals("py")) {
+ if (!file.isFile() || !Share.getExtension(file.getName()).equals("py")) {
System.err.println("Wont parse: " + fileStr);
continue;
}
@@ -56,13 +56,4 @@ public class ParseAll {
}
}
}
-
- public static String getExtension(String fileName) {
- int extensionIndex = fileName.lastIndexOf('.');
- if (extensionIndex == -1) {
- return fileName;
- } else {
- return fileName.substring(extensionIndex + 1);
- }
- }
}