LibClang-3.4.0: Haskell bindings for libclang (a C++ parsing library)

Safe HaskellNone
LanguageHaskell2010

Clang.Range

Contents

Description

Functions for manipulating SourceRanges, which represent a range of locations in the source code between two points.

This module is intended to be imported qualified.

Synopsis

Creating ranges

create Source

Arguments

:: ClangBase m 
=> SourceLocation s'

Starting location.

-> SourceLocation s''

Ending location.

-> ClangT s m (SourceRange s) 

Creates a SourceRange representing the range between two locations.

createInvalid :: ClangBase m => ClangT s m (SourceRange s) Source

Creates an invalid SourceRange.

Analyzing ranges

getStart :: ClangBase m => SourceRange s' -> ClangT s m (SourceLocation s) Source

Retrieves the beginning of the given range.

getEnd :: ClangBase m => SourceRange s' -> ClangT s m (SourceLocation s) Source

Retrieves the end of the given range.

isInvalid :: SourceRange s' -> Bool Source

Returns True if the given range is invalid.