private def guardAgainstCqlField()

in src/main/scala/lang/Parser.scala [153:175]


  private def guardAgainstCqlField(errorLocation: String) =
    peek().tokenType match {
      case TokenType.AT =>
        throw error(
          s"You cannot put output modifiers (e.g. @show-fields:all) ${errorLocation}"
        )
      case TokenType.PLUS =>
        throw error(
          s"You cannot put queries for tags, sections etc. ${errorLocation}"
        )
      case TokenType.CHIP_KEY =>
        val queryFieldNode = queryField
        throw error(
          s"You cannot query for ${queryFieldNode.key.literal.getOrElse("")}s ${errorLocation}"
        )
      case TokenType.QUERY_OUTPUT_MODIFIER_KEY =>
        val queryFieldNode = queryOutputModifier
        throw error(
          s"You cannot add an output modifier for ${queryFieldNode.key.literal
              .getOrElse("")}s ${errorLocation}"
        )
      case _ => ()
    }