Record Class PartialEk9StringToInstructionBlock.Result
java.lang.Object
java.lang.Record
org.ek9lang.compiler.common.PartialEk9StringToInstructionBlock.Result
- Record Components:
block- the parsed instruction block (never null, but may be incomplete whenerrorListener.hasErrors())errorListener- the listener that captured any lex/parse errors
- Enclosing class:
PartialEk9StringToInstructionBlock
public static record PartialEk9StringToInstructionBlock.Result(EK9Parser.InstructionBlockContext block, ErrorListener errorListener)
extends Record
The parse outcome: the block context (may be partial when there are errors)
and the error listener so callers can gate on a clean parse.
-
Constructor Summary
ConstructorsConstructorDescriptionResult(EK9Parser.InstructionBlockContext block, ErrorListener errorListener) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorListenerrecord component.booleanfinal inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Result
Creates an instance of aResultrecord class.- Parameters:
block- the value for theblockrecord componenterrorListener- the value for theerrorListenerrecord component
-
-
Method Details
-
hasErrors
public boolean hasErrors() -
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. All components in this record class are compared withObjects::equals(Object,Object). -
block
-
errorListener
Returns the value of theerrorListenerrecord component.- Returns:
- the value of the
errorListenerrecord component
-