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.



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

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

Instance Method Details

#to_idlObject



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

def to_idl = "-"

#type(_symtab) ⇒ Type

Return the type of this node

Parameters:

Returns:

  • (Type)

    The type of the node



3877
3878
3879
# File 'lib/idl/ast.rb', line 3877

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

#type_check(_symtab) ⇒ Object



3872
3873
3874
# File 'lib/idl/ast.rb', line 3872

def type_check(_symtab)
  # nothing to do!
end

#value(_symtab, _archdef) ⇒ 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:



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

def value(_symtab, _archdef) = 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 evaulation

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