Record Class Lexer.Result
java.lang.Object
java.lang.Record
org.clafer.frontend.Lexer.Result
- Record Components:
tokens- the tokens for the parser, ending withTokenKind.EOFcomments- the comments, in orderdiagnostics- the errors, in order
- Enclosing class:
Lexer
public static record Lexer.Result(List<Token> tokens, List<Token> comments, List<Diagnostic> diagnostics)
extends Record
The tokens of a source text.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomments()Returns the value of thecommentsrecord component.Returns the value of thediagnosticsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.tokens()Returns the value of thetokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Result
Creates an instance of aResultrecord class.- Parameters:
tokens- the value for thetokensrecord componentcomments- the value for thecommentsrecord componentdiagnostics- the value for thediagnosticsrecord component
-
-
Method Details
-
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). -
tokens
-
comments
-
diagnostics
Returns the value of thediagnosticsrecord component.- Returns:
- the value of the
diagnosticsrecord component
-