class FFI::Clang::SourceRange

Attributes

range[R]

Public Class Methods

new(range_or_begin_location, end_location = nil) click to toggle source
# File lib/ffi/clang/source_range.rb, line 33
def initialize(range_or_begin_location, end_location = nil)
        if end_location.nil?
                @range = range_or_begin_location
        else
                @range = Lib.get_range(range_or_begin_location.location, end_location.location)
        end
end
null_range() click to toggle source
# File lib/ffi/clang/source_range.rb, line 29
def self.null_range
        SourceRange.new Lib.get_null_range
end

Public Instance Methods

==(other) click to toggle source
# File lib/ffi/clang/source_range.rb, line 55
def ==(other)
        Lib.equal_range(@range, other.range) != 0
end
end() click to toggle source
# File lib/ffi/clang/source_range.rb, line 45
def end
        ExpansionLocation.new(Lib.get_range_end @range)
end
null?() click to toggle source
# File lib/ffi/clang/source_range.rb, line 49
def null?
        Lib.range_is_null(@range) != 0
end
start() click to toggle source
# File lib/ffi/clang/source_range.rb, line 41
def start
        ExpansionLocation.new(Lib.get_range_start @range)
end