Class: AdLint::Cc1::ObjectSpecifier

Inherits:
PrimaryExpression show all
Defined in:
lib/adlint/cc1/syntax.rb

Instance Attribute Summary collapse

Attributes inherited from SyntaxNode

#head_token, #subsequent_sequence_point, #tail_token

Instance Method Summary collapse

Methods inherited from Expression

#constant?, #full=, #object_specifiers

Methods inherited from SyntaxNode

#head_location, #short_class_name, #tail_location

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(id) ⇒ ObjectSpecifier

Returns a new instance of ObjectSpecifier.



576
577
578
579
# File 'lib/adlint/cc1/syntax.rb', line 576

def initialize(id)
  super()
  @identifier = id
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



581
582
583
# File 'lib/adlint/cc1/syntax.rb', line 581

def identifier
  @identifier
end

Instance Method Details

#arithmetic?Boolean

Returns:

  • (Boolean)


595
596
597
# File 'lib/adlint/cc1/syntax.rb', line 595

def arithmetic?
  false
end

#bitwise?Boolean

Returns:

  • (Boolean)


599
600
601
# File 'lib/adlint/cc1/syntax.rb', line 599

def bitwise?
  false
end

#have_side_effect?Boolean

Returns:

  • (Boolean)


587
588
589
# File 'lib/adlint/cc1/syntax.rb', line 587

def have_side_effect?
  false
end

#inspect(indent = 0) ⇒ Object



620
621
622
623
# File 'lib/adlint/cc1/syntax.rb', line 620

def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{location.inspect}) " +
    "#{@identifier.value}"
end

#locationObject



583
584
585
# File 'lib/adlint/cc1/syntax.rb', line 583

def location
  @identifier.location
end

#logical?Boolean

Returns:

  • (Boolean)


591
592
593
# File 'lib/adlint/cc1/syntax.rb', line 591

def logical?
  false
end

#to_complemental_logicalObject



612
613
614
# File 'lib/adlint/cc1/syntax.rb', line 612

def to_complemental_logical
  self
end

#to_normalized_logical(parent_expr = nil) ⇒ Object



603
604
605
606
607
608
609
610
# File 'lib/adlint/cc1/syntax.rb', line 603

def to_normalized_logical(parent_expr = nil)
  case parent_expr
  when nil, LogicalAndExpression, LogicalOrExpression
    create_normalized_logical_of(self)
  else
    self
  end
end

#to_sObject



616
617
618
# File 'lib/adlint/cc1/syntax.rb', line 616

def to_s
  @identifier.value
end