Skip to content

Commit

Permalink
#32. Cap And Dollar Handling
Browse files Browse the repository at this point in the history
Refactoring.
  • Loading branch information
curious-odd-man committed Apr 29, 2020
1 parent 62f66e6 commit ae70f8f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 27 deletions.
6 changes: 3 additions & 3 deletions performance.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Benchmark Mode Cnt Score Error Units
PerformanceTests.generateTest avgt 5 107.393 ± 104.249 us/op
PerformanceTests.generateUniqueTest avgt 5 390208.848 ± 450765.068 us/op
Benchmark Mode Cnt Score Error Units
PerformanceTests.generateTest avgt 5 93.274 ± 34.453 us/op
PerformanceTests.generateUniqueTest avgt 5 239288.138 ± 80676.339 us/op
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
public class LineEnd implements Node {
private final String aContext;

public LineEnd() {
this("");
}

public LineEnd(String context) {
aContext = context;
}
Expand All @@ -20,8 +24,6 @@ public String getContext() {

@Override
public String toString() {
return "LineEnd{" +
"aContext='" + aContext + '\'' +
'}';
return "LineEnd{}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
public class LineStart implements Node {
private final String aContext;

public LineStart() {
this("");
}

public LineStart(String context) {
aContext = context;
}
Expand All @@ -20,8 +24,6 @@ public String getContext() {

@Override
public String toString() {
return "LineStart{" +
"aContext='" + aContext + '\'' +
'}';
return "LineStart{}";
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.github.curiousoddman.rgxgen.simplifier;

import com.github.curiousoddman.rgxgen.generator.nodes.Node;

public class DefaultSimplifier implements Simplifier {
@Override
public Node simplify(Node input) {
return input;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.github.curiousoddman.rgxgen.simplifier;

import com.github.curiousoddman.rgxgen.generator.nodes.Node;

public interface Simplifier {

Node simplify(Node input);
}

0 comments on commit ae70f8f

Please sign in to comment.