Class: AdLint::Cc1::SequencePoint
- Inherits:
-
Object
- Object
- AdLint::Cc1::SequencePoint
- Includes:
- LocationHolder
- Defined in:
- lib/adlint/cc1/seqp.rb
Overview
NOTE: The ISO C99 standard says;
Annex C (informative) Sequence points
1 The following are the sequence points described in 5.1.2.3:
-- The call to a function, after the arguments have been evaluated
(6.5.2.2).
-- The end of the first operand of the following operators: logical AND
&& (6.5.13); logical OR || (6.5.14); conditional ? (6.5.15); comma ,
(6.5.17).
-- The end of a full declarator: declarators (6.7.5).
-- The end of a full expression: an initializer (6.7.8); the expression
in an expression statement (6.8.3); the controlling expression of a
while or do statement (6.8.5); each of the expressions of a for
statement (6.8.5.3); the expression in a return statement (6.8.6.4).
-- Immediately before a library function returns (7.1.4).
-- After the actions associated with each formatted input/output function
conversion specifier (7.19.6, 7.24.2).
-- Immediately before and immediately after each call to a comparison
function, and also between any call to a comparison function and any
movement of the objects passed as arguments to that call (7.20.5).
Instance Attribute Summary collapse
-
#last_node ⇒ Object
readonly
Returns the value of attribute last_node.
Instance Method Summary collapse
-
#initialize(lst_node, obvious = true) ⇒ SequencePoint
constructor
A new instance of SequencePoint.
- #location ⇒ Object
- #obvious? ⇒ Boolean
Methods included from LocationHolder
Constructor Details
#initialize(lst_node, obvious = true) ⇒ SequencePoint
Returns a new instance of SequencePoint.
63 64 65 66 |
# File 'lib/adlint/cc1/seqp.rb', line 63 def initialize(lst_node, obvious = true) @last_node = lst_node @obvious = obvious end |
Instance Attribute Details
#last_node ⇒ Object (readonly)
Returns the value of attribute last_node.
68 69 70 |
# File 'lib/adlint/cc1/seqp.rb', line 68 def last_node @last_node end |
Instance Method Details
#location ⇒ Object
70 71 72 |
# File 'lib/adlint/cc1/seqp.rb', line 70 def location @last_node.location end |
#obvious? ⇒ Boolean
74 75 76 |
# File 'lib/adlint/cc1/seqp.rb', line 74 def obvious? @obvious end |