All Downloads are FREE. Search and download functionalities are using the official Maven repository.

app.cash.sqldelight.dialects.postgresql.grammar.mixins.StringLiteralMixin.kt Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
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