class BOAST::Pragma

@!parse module Functors; functorize Pragma; end

Attributes

name[R]
options[R]

Public Class Methods

new(name, *options) click to toggle source
# File lib/BOAST/Language/Pragma.rb, line 12
def initialize(name, *options)
  @name = name
  @options = options
end

Public Instance Methods

pr() click to toggle source
# File lib/BOAST/Language/Pragma.rb, line 30
def pr
  s=""
  s << to_s
  output.puts s
  return self
end
to_s() click to toggle source
# File lib/BOAST/Language/Pragma.rb, line 17
def to_s
  s = ""
  if lang == FORTRAN then
    s << "!#{@name}$"
  else
    s << "#pragma #{name}"
  end
  @options.each{ |opt|
    s << " #{opt}"
  }
  return s
end