Class: Datadog::DI::EL::Compiler Private

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/di/el/compiler.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

DI Expression Language compiler.

Converts AST in probe definitions into Expression objects.

WARNING: this class produces strings that are then eval’d as Ruby code. Input ASTs are user-controlled. As such the compiler must sanitize and escape all input to avoid injection.

Besides quotes and backslashes we must also escape # which is starting string interpolation (#…).

Instance Method Summary collapse

Instance Method Details

#compile(ast) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19
20
21
# File 'lib/datadog/di/el/compiler.rb', line 19

def compile(ast)
  compile_partial(ast)
end