Record Class CompileClassifier.ParseResult
java.lang.Object
java.lang.Record
org.ek9lang.compiler.fuzz.CompileClassifier.ParseResult
- Enclosing class:
CompileClassifier
static record CompileClassifier.ParseResult(boolean parseable, ErrorListener errorListener)
extends Record
Result of a quick parse: whether the source parsed and the error listener with any errors.
Callers should use
harvestErrorCodes(FuzzStatistics) to record any parse-phase
error codes (e.g. E01084, E01085, E01086) that would otherwise be lost.-
Constructor Summary
ConstructorsConstructorDescriptionParseResult(boolean parseable, ErrorListener errorListener) Creates an instance of aParseResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorListenerrecord component.(package private) voidharvestErrorCodes(FuzzStatistics stats) Extract any semantic error codes from the parse error listener and record them.(package private) voidharvestErrorCodes(FuzzStatistics stats, String strandId) Extract parse-phase error codes with strand attribution for discovery tracking.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theparseablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParseResult
ParseResult(boolean parseable, ErrorListener errorListener) Creates an instance of aParseResultrecord class.- Parameters:
parseable- the value for theparseablerecord componenterrorListener- the value for theerrorListenerrecord component
-
-
Method Details
-
harvestErrorCodes
Extract any semantic error codes from the parse error listener and record them. This captures parse-phase error codes that have semantic classifications, such as operator position errors (E01084/E01085/E01086). -
harvestErrorCodes
Extract parse-phase error codes with strand attribution for discovery tracking. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
parseable
public boolean parseable()Returns the value of theparseablerecord component.- Returns:
- the value of the
parseablerecord component
-
errorListener
Returns the value of theerrorListenerrecord component.- Returns:
- the value of the
errorListenerrecord component
-