Class: AdLint::Cpp::PreprocessingFile
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cpp::PreprocessingFile
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#fpath ⇒ Object
readonly
Returns the value of attribute fpath.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Instance Method Summary collapse
- #concat(pp_file) ⇒ Object
-
#initialize(fpath, group = nil) ⇒ PreprocessingFile
constructor
A new instance of PreprocessingFile.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(fpath, group = nil) ⇒ PreprocessingFile
Returns a new instance of PreprocessingFile.
80 81 82 83 |
# File 'lib/adlint/cpp/syntax.rb', line 80 def initialize(fpath, group = nil) @fpath = fpath @group = group end |
Instance Attribute Details
#fpath ⇒ Object (readonly)
Returns the value of attribute fpath.
85 86 87 |
# File 'lib/adlint/cpp/syntax.rb', line 85 def fpath @fpath end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
86 87 88 |
# File 'lib/adlint/cpp/syntax.rb', line 86 def group @group end |
Instance Method Details
#concat(pp_file) ⇒ Object
92 93 94 |
# File 'lib/adlint/cpp/syntax.rb', line 92 def concat(pp_file) @group.group_parts.concat(pp_file.group.group_parts) end |
#inspect(indent = 0) ⇒ Object
96 97 98 99 |
# File 'lib/adlint/cpp/syntax.rb', line 96 def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + (@group ? @group.inspect(indent + 1) : "") end |
#location ⇒ Object
88 89 90 |
# File 'lib/adlint/cpp/syntax.rb', line 88 def location @group.location end |