Skip to content
Snippets Groups Projects
Commit e1c0a972 authored by hansen's avatar hansen
Browse files

support performance optimisations

parent 2546f06d
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,10 @@ public class Parser implements IParser
+ token.getText().length());
}
protected boolean addElementsFromListToNewList(String productionRuleAsString) {
return true;
}
$
Macro:ParserInliningPushHeader
......@@ -399,6 +403,7 @@ Macro:ParserNewHeader
{
this.firstPopped = null;
this.lastPopped = null;
final boolean addElementsToNewList = addElementsFromListToNewList("$1$");
ArrayList nodeList = new ArrayList();
......@@ -474,8 +479,11 @@ $
Macro:ParserTypedLinkedListAddAll
if($2$Node$3$ != null) //Macro:ParserTypedLinkedListAddAll
{
if(addElementsToNewList){
$0$Node$1$.addAll($2$Node$3$);
//$0$Node$1$ = $2$Node$3$;
}else{
$0$Node$1$ = $2$Node$3$;
}
}
$
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment