Module: LogStashCompilerLSCLGrammar::LogStash::Compiler::LSCL::AST::NegativeExpression

Includes:
Helpers
Defined in:
lib/logstash/compiler/lscl.rb

Constant Summary

Constants included from Helpers

Helpers::AND_METHOD, Helpers::BOOLEAN_DSL_METHOD_SIGNATURE, Helpers::NAND_METHOD, Helpers::OR_METHOD, Helpers::XOR_METHOD

Instance Method Summary collapse

Methods included from Helpers

#base_id, #base_protocol, #base_source_with_metadata, #base_source_with_metadata=, #compose, #compose_for, #jdsl, jdsl, #line_and_column, #source_meta

Instance Method Details

#exprObject



429
430
431
432
433
# File 'lib/logstash/compiler/lscl.rb', line 429

def expr
  exprs = self.recursive_select(Condition, Selector).map(&:expr)
  raise "Negative exprs should only have one part!" if exprs.size != 1
  jdsl.eNot(source_meta, exprs.first)
end