Class: Idl::DontCareLvalueAst

Inherits:
AstNode
  • Object
show all
Includes:
Rvalue
Defined in:
lib/idl/ast.rb

Instance Method Summary collapse

Constructor Details

#initialize(input, interval) ⇒ DontCareLvalueAst

Returns a new instance of DontCareLvalueAst.



3892
# File 'lib/idl/ast.rb', line 3892

def initialize(input, interval) = super(input, interval, EMPTY_ARRAY)

Instance Method Details

#to_idlObject



3907
# File 'lib/idl/ast.rb', line 3907

def to_idl = "-"

#type(_symtab) ⇒ Type

Return the type of this node

Parameters:

Returns:

  • (Type)

    The type of the node



3900
3901
3902
# File 'lib/idl/ast.rb', line 3900

def type(_symtab)
  Type.new(:dontcare)
end

#type_check(_symtab) ⇒ Object



3895
3896
3897
# File 'lib/idl/ast.rb', line 3895

def type_check(_symtab)
  # nothing to do!
end

#value(_symtab, _cfg_arch) ⇒ Integer, Boolean

Return the compile-time-known value of the node

Parameters:

Returns:

  • (Integer)

    if the compile-time-known value is an integer

  • (Boolean)

    if the compile-time-known value is a boolean

Raises:



3905
# File 'lib/idl/ast.rb', line 3905

def value(_symtab, _cfg_arch) = internal_error "Why are you calling value for an lval?"

#values(symtab) ⇒ Array<Integer>, ... Originally defined in module Rvalue

Return a complete list of possible compile-time-known values of the node, or raise a ValueError if the full list cannot be determined

For most AstNodes, this will just be a single-entry array

Parameters:

  • symtab (SymbolTable)

    The context for the evaluation

Returns:

  • (Array<Integer>)

    The complete list of compile-time-known values, when they are integral

  • (Array<Boolean>)

    The complete list of compile-time-known values, when they are booleans

  • (AstNode::ValueError)

    if the list of values is not knowable at compile time