Commit afd136e9 authored by Custom2043's avatar Custom2043
Browse files

fix++

parent a6e30a36
......@@ -7,13 +7,7 @@ import java.util.List;
import parser.ParserString;
import parser.Token;
import tokens.ArraySearchToken;
import tokens.Line;
import tokens.MultipleSearchToken;
import tokens.OrSearchToken;
import tokens.SearchToken;
import tokens.Space;
import tokens.TokenSearchToken;
import tokens.*;
public class Compiler
{
......@@ -63,10 +57,7 @@ public class Compiler
{
if (t instanceof ParserString && ((ParserString)t).index == ParserString.anyChar.getIndex())
report(new Info(InfoModel.invalidChar, t));
else if (!(t instanceof Line || t instanceof Space || t instanceof LineJump))
report(new Info(InfoModel.syntaxError, t));
else
else if (t instanceof Line)
{
for (Line l : lines)
if (!l.header.id.getName().equals("ignore") && l.header.id.getName().equals(((Line)t).header.id.getName()))
......@@ -85,6 +76,8 @@ public class Compiler
lines.add((Line)t);
}
else if (!(t instanceof Space || t instanceof Jump))
report(new Info(InfoModel.syntaxError, t));
enabled = t instanceof Line;
}
......
......@@ -36,7 +36,6 @@ public class TokenBuilder extends Builder
else
{
List<Search> s = addIgnores(this.ignore, this.searches);
//s.add(this.ignore.getRealSearch());
this.searchesWithIgnore = s.toArray(new Search[s.size()]);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment