2023-09-05 14:04:39 -07:00
|
|
|
// GENERATED CODE FROM PORK AST CODEGEN
|
2023-10-06 15:39:13 -07:00
|
|
|
package gay.pizza.pork.ast.gen
|
2023-08-22 21:58:56 -07:00
|
|
|
|
2023-08-30 03:54:14 -07:00
|
|
|
import kotlinx.serialization.SerialName
|
|
|
|
import kotlinx.serialization.Serializable
|
2023-08-22 21:58:56 -07:00
|
|
|
|
2023-08-30 03:54:14 -07:00
|
|
|
@Serializable
|
|
|
|
@SerialName("stringLiteral")
|
2023-08-22 21:58:56 -07:00
|
|
|
class StringLiteral(val text: String) : Expression() {
|
|
|
|
override val type: NodeType = NodeType.StringLiteral
|
|
|
|
|
2023-09-05 14:04:39 -07:00
|
|
|
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
|
|
|
visitor.visitStringLiteral(this)
|
|
|
|
|
2023-08-22 21:58:56 -07:00
|
|
|
override fun equals(other: Any?): Boolean {
|
|
|
|
if (other !is StringLiteral) return false
|
|
|
|
return other.text == text
|
|
|
|
}
|
|
|
|
|
|
|
|
override fun hashCode(): Int {
|
|
|
|
var result = text.hashCode()
|
|
|
|
result = 31 * result + type.hashCode()
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
}
|