Class: RLSL::BaseTranslator::TargetProfile

Inherits:
Struct
  • Object
show all
Defined in:
lib/rlsl/base_translator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#call_rewritesObject

Returns the value of attribute call_rewrites

Returns:

  • (Object)

    the current value of call_rewrites



13
14
15
# File 'lib/rlsl/base_translator.rb', line 13

def call_rewrites
  @call_rewrites
end

#identifier_replacementsObject

Returns the value of attribute identifier_replacements

Returns:

  • (Object)

    the current value of identifier_replacements



13
14
15
# File 'lib/rlsl/base_translator.rb', line 13

def identifier_replacements
  @identifier_replacements
end

#removed_identifiersObject

Returns the value of attribute removed_identifiers

Returns:

  • (Object)

    the current value of removed_identifiers



13
14
15
# File 'lib/rlsl/base_translator.rb', line 13

def removed_identifiers
  @removed_identifiers
end

#uniform_targetObject

Returns the value of attribute uniform_target

Returns:

  • (Object)

    the current value of uniform_target



13
14
15
# File 'lib/rlsl/base_translator.rb', line 13

def uniform_target
  @uniform_target
end

Instance Method Details

#translate(code) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/rlsl/base_translator.rb', line 20

def translate(code)
  CodeRewriter.new(code).rewrite(
    identifier_replacements: identifier_replacements,
    call_rewrites: call_rewrites,
    removed_identifiers: removed_identifiers
  )
end