CKToken Reference

File
ClangKit/Classes/CKToken.h
Author
Jean-David Gadina - www.xs-labs.com
Copyright
© (c) 2010-2014 - Jean-David Gadina - www.xs-labs.com
Date
Wednesday, June 25, 2014
Includes
None

Overview

ClangKit token class

Class CKToken

Attributes

Superclass
NSObject

+ tokensForTranslationUnit:tokens:

Gets a list of token objects from a translation unit

+ ( NSArray * )tokensForTranslationUnit: ( CKTranslationUnit * )translationUnit tokens: ( void ** )tokensPointer;

Parameters
  • translationUnit
    The translation unit
  • tokensPointer
    Optional - Used to retrieve the internal libclang tokens
Return value

An array of token objects

column

The column number for the token

@property( atomic, readonly ) NSUInteger column;

cursor

The token's cursor

@property( atomic, readonly ) CKCursor * cursor;

kind

The token kind

@property( atomic, readonly ) CKTokenKind kind;

line

The line number for the token

@property( atomic, readonly ) NSUInteger line;

range

The token's range

@property( atomic, readonly ) NSRange range;

sourceLocation

The source location of the token

@property( atomic, readonly ) CKSourceLocation * sourceLocation;

spelling

The token's spelling

@property( atomic, readonly ) NSString * spelling;

Types

CKTokenKind

Token kind

typedef NSInteger CKTokenKind;

Globals

CKTokenKindComment

Token kind - Comment

FOUNDATION_EXPORT CKTokenKind CKTokenKindComment;

CKTokenKindIdentifier

Token kind - Identifier

FOUNDATION_EXPORT CKTokenKind CKTokenKindIdentifier;

CKTokenKindKeyword

Token kind - Keyword

FOUNDATION_EXPORT CKTokenKind CKTokenKindKeyword;

CKTokenKindLiteral

Token kind - Literal

FOUNDATION_EXPORT CKTokenKind CKTokenKindLiteral;

CKTokenKindPunctuation

Token kind - Punctuation

FOUNDATION_EXPORT CKTokenKind CKTokenKindPunctuation;