Class: Sexpir::Signal

Inherits:
Ast
  • Object
show all
Defined in:
lib/sexpir/ast.rb,
lib/sexpir/ast_sexp.rb

Direct Known Subclasses

Io

Instance Attribute Summary collapse

Attributes inherited from Ast

#node

Instance Method Summary collapse

Methods inherited from Ast

#accept

Instance Attribute Details

#bits_signObject

Returns the value of attribute bits_sign.



21
22
23
# File 'lib/sexpir/ast.rb', line 21

def bits_sign
  @bits_sign
end

#maxObject

Returns the value of attribute max.



25
26
27
# File 'lib/sexpir/ast.rb', line 25

def max
  @max
end

#minObject

Returns the value of attribute min.



25
26
27
# File 'lib/sexpir/ast.rb', line 25

def min
  @min
end

#nameObject

Returns the value of attribute name.



20
21
22
# File 'lib/sexpir/ast.rb', line 20

def name
  @name
end

#name_overrideObject

Returns the value of attribute name_override.



24
25
26
# File 'lib/sexpir/ast.rb', line 24

def name_override
  @name_override
end

#resetObject

Returns the value of attribute reset.



22
23
24
# File 'lib/sexpir/ast.rb', line 22

def reset
  @reset
end

#reset_lessObject

Returns the value of attribute reset_less.



23
24
25
# File 'lib/sexpir/ast.rb', line 23

def reset_less
  @reset_less
end

#typeObject

Returns the value of attribute type.



20
21
22
# File 'lib/sexpir/ast.rb', line 20

def type
  @type
end

Instance Method Details

#sexpObject



33
34
35
36
37
38
39
40
# File 'lib/sexpir/ast_sexp.rb', line 33

def sexp
  attrs=instance_variables.map do |ivar|
    var=ivar[1..-1]
    value=instance_variable_get(ivar)
    "(#{var} #{value})"
  end.join(' ')
  "(signal #{attrs})"
end