Make JsAst serializable again
@@ -25,6 +25,7 @@ import com.google.javascript.rhino.IR;
import com.google.javascript.rhino.InputId;
import com.google.javascript.rhino.Node;
import java.io.IOException;
+import java.io.Serializable;
import java.util.ArrayList;
/**
@@ -85,7 +86,10 @@ public class JsAst implements SourceAst {
return features;
}
- public static class RhinoError {
+ /** Representation of Rhino parser error. */
+ public static class RhinoError implements Serializable {
+ private static final long serialVersionUID = 1L;
+
public final String message;
public final String sourceName;
public final int line;
@@ -100,9 +104,12 @@ public class JsAst implements SourceAst {
}
/** Simple class to share parse results between compilation jobs */
- public static class ParseResult {
+ public static class ParseResult implements Serializable {
+ private static final long serialVersionUID = 1L;
+
public final ImmutableList<RhinoError> errors;
public final ImmutableList<RhinoError> warnings;
+
ParseResult(ImmutableList<RhinoError> errors, ImmutableList<RhinoError> warnings) {
this.errors = errors;
this.warnings = warnings;
