PAN-10 added a null check to the recurse method
This commit is contained in:
@@ -35,8 +35,9 @@ class ParserService {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch(final Exception e) {
|
} catch(final Exception e) {
|
||||||
return false;
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Node parseRawInput(String input)
|
public Node parseRawInput(String input)
|
||||||
@@ -59,14 +60,16 @@ class ParserService {
|
|||||||
{
|
{
|
||||||
int startIndex;
|
int startIndex;
|
||||||
int endIndex;
|
int endIndex;
|
||||||
final String statement = current.getStatement();
|
final String statement;
|
||||||
String nextStatement;
|
|
||||||
|
|
||||||
if(statement.equals(""))
|
if (current != null) {
|
||||||
{
|
statement = current.getStatement();
|
||||||
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String nextStatement;
|
||||||
|
|
||||||
if(statement.contains("let"))
|
if(statement.contains("let"))
|
||||||
{
|
{
|
||||||
current.setLeft(new Node("let", current));
|
current.setLeft(new Node("let", current));
|
||||||
|
|||||||
Reference in New Issue
Block a user