Skip to content

Commit

Permalink
Updates symbol serialization in all Location subclasses in Scanner (#214
Browse files Browse the repository at this point in the history
)

Followup to #213, this PR fixes symbol serialization in all `Location` subclasses.
  • Loading branch information
nimakarimipour authored Nov 17, 2023
1 parent e085b64 commit a134f7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package edu.ucr.cs.riple.scanner.location;

import com.sun.tools.javac.code.Symbol;
import edu.ucr.cs.riple.scanner.Serializer;
import javax.lang.model.element.ElementKind;

/**
Expand All @@ -44,9 +45,9 @@ public String tabSeparatedToString() {
return String.join(
"\t",
type.toString(),
enclosingClass.flatName(),
Serializer.serializeSymbol(enclosingClass),
"null",
variableSymbol.toString(),
Serializer.serializeSymbol(variableSymbol),
"null",
path != null ? path.toString() : "null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package edu.ucr.cs.riple.scanner.location;

import com.sun.tools.javac.code.Symbol;
import edu.ucr.cs.riple.scanner.Serializer;
import javax.lang.model.element.ElementKind;

/**
Expand All @@ -44,8 +45,8 @@ public String tabSeparatedToString() {
return String.join(
"\t",
type.toString(),
enclosingClass.flatName(),
enclosingMethod.toString(),
Serializer.serializeSymbol(enclosingClass),
Serializer.serializeSymbol(enclosingMethod),
"null",
"null",
path != null ? path.toString() : "null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public String tabSeparatedToString() {
return String.join(
"\t",
type.toString(),
enclosingClass.flatName(),
Serializer.serializeSymbol(enclosingClass),
Serializer.serializeSymbol(enclosingMethod),
Serializer.serializeSymbol(paramSymbol),
String.valueOf(index),
Expand Down

0 comments on commit a134f7c

Please sign in to comment.