app.cash.sqldelight.dialects.postgresql.grammar.mixins.StringLiteralMixin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql-dialect Show documentation
Show all versions of postgresql-dialect Show documentation
The PostgreSQL Dialect for SQLDelight
package app.cash.sqldelight.dialects.postgresql.grammar.mixins
import com.alecstrong.sql.psi.core.SqlAnnotationHolder
import com.alecstrong.sql.psi.core.psi.impl.SqlStringLiteralImpl
import com.intellij.lang.ASTNode
internal abstract class StringLiteralMixin(node: ASTNode) : SqlStringLiteralImpl(node) {
override fun annotate(annotationHolder: SqlAnnotationHolder) {
if (node.text.startsWith('"')) {
annotationHolder.createErrorAnnotation(this, "String literals should use ' instead of \"")
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy