Protocols

The following protocols are available globally.

  • The type of an element in the abstract syntax tree.

    See more

    Declaration

    Swift

    public protocol CType: CustomStringConvertible
  • A Comment is a parsed documentation comment in a C/C++/Objective-C source file.

    See more

    Declaration

    Swift

    public protocol Comment
  • A cursor representing some element in the abstract syntax tree for a translation unit.

    The cursor abstraction unifies the different kinds of entities in a program–declaration, statements, expressions, references to declarations, etc.–under a single cursor abstraction with a common set of operations. Common operation for a cursor include: getting the physical location in a source file where the cursor points, getting the name associated with a cursor, and retrieving cursors for any child nodes of a particular cursor. Cursors can be produced in two specific ways.

    TranslationUnit.cursor produces a cursor for a translation unit, from which one can use `children() to explore the rest of the translation unit.

    SourceLocation.cursor maps from a physical source location to the entity that resides at that location, allowing one to map from the source code into the AST.

    See more

    Declaration

    Swift

    public protocol Cursor: CustomStringConvertible
  • Represents a C, C++, or Objective-C token.

    See more

    Declaration

    Swift

    public protocol Token