Class: AdLint::Cc1::AlignofTypeExpression

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

Instance Attribute Summary

Attributes inherited from UnaryExpression

#operand, #operator

Attributes inherited from SyntaxNode

#head_token, #subsequent_sequence_point, #tail_token

Instance Method Summary collapse

Methods inherited from UnaryExpression

#initialize, #inspect, #location

Methods inherited from Expression

#constant?, #full=, #initialize, #object_specifiers

Methods inherited from SyntaxNode

#head_location, #initialize, #inspect, #location, #short_class_name, #tail_location

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

This class inherits a constructor from AdLint::Cc1::UnaryExpression

Instance Method Details

#arithmetic?Boolean

Returns:

  • (Boolean)


1609
1610
1611
# File 'lib/adlint/cc1/syntax.rb', line 1609

def arithmetic?
  false
end

#bitwise?Boolean

Returns:

  • (Boolean)


1613
1614
1615
# File 'lib/adlint/cc1/syntax.rb', line 1613

def bitwise?
  false
end

#have_side_effect?Boolean

Returns:

  • (Boolean)


1601
1602
1603
# File 'lib/adlint/cc1/syntax.rb', line 1601

def have_side_effect?
  false
end

#logical?Boolean

Returns:

  • (Boolean)


1605
1606
1607
# File 'lib/adlint/cc1/syntax.rb', line 1605

def logical?
  false
end

#to_complemental_logicalObject



1626
1627
1628
# File 'lib/adlint/cc1/syntax.rb', line 1626

def to_complemental_logical
  self
end

#to_normalized_logical(parent_expr = nil) ⇒ Object



1617
1618
1619
1620
1621
1622
1623
1624
# File 'lib/adlint/cc1/syntax.rb', line 1617

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



1630
1631
1632
# File 'lib/adlint/cc1/syntax.rb', line 1630

def to_s
  "alignof(#{@operand.to_s})"
end