Advertisement
SforzandoCF

llsvx

Mar 8th, 2024 (edited)
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. public class LLSVX extends LX01Object {
  2.     public checkSyntax (File f) {
  3.         String syntax = "";
  4.         for (String s : Files.readAllLines(f.toPath())) syntax = syntax.concat(s);
  5.         checkSyntax(syntax, f.getName());
  6.     }
  7.    
  8.     public checkSyntax (String syntax, String name) {
  9.         String moduleName = name.substring(0, name.lastIndexOf(".") - 1);
  10.         ArrayList<String> lines = Arrays.asList(syntax.split("\n"));
  11.         for (String s : lines) {
  12.             if (s == "") {
  13.                 lines.remove(s);
  14.             } else if (s.startsWith("$")) {
  15.                 if (s.startsWith("$define")) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement