SCKSourceFile documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the SCKSourceFile class
  2. Software documentation for the SCKSourceLocation class

Software documentation for the SCKSourceFile class

SCKSourceFile : NSObject

Declared in:
SCKSourceFile.h

The SCKSyntaxHighlighter class is responsible for performing lexical and syntax highlighting on a single source file. Highlighting involves three steps:

1) Lexical markup. 2) Syntax markup. 3) Presentation markup.

Lexical highlighting is faster than full syntax highlighting, so it can be used more frequently in an editor. For example, you might run the lexical highlighter after every key press but defer the syntax highlighter until after a whitespace character had been entered.

The third step is optional. If you are not using AppKit, then you can ignore it and handle the presentation yourself. This is useful, for example, when generating semantic HTML from a source file.


Instance Variables

Method summary

fileUsingIndex: 

+ (SCKSourceFile*) fileUsingIndex: (SCKIndex*)anIndex;
Description forthcoming.

addIncludePath: 

- (void) addIncludePath: (NSString*)includePath;

Adds an include path to search when performing syntax highlighting.


collectDiagnostics 

- (void) collectDiagnostics;

Checks for errors and adds kSCKDiagnostic attributes to ranges in the source attributed string which contain them.


completeAtLocation: 

- (SCKCodeCompletionResult*) completeAtLocation: (NSUInteger)location;

Returns completion result at the location


lexicalHighlightFile 

- (void) lexicalHighlightFile;

Performs lexical highlighting on the entire file.


reparse 

- (void) reparse;

Parses the contents of the file. Must be called before reapplying highlighting after the file has changed.


syntaxHighlightFile 

- (void) syntaxHighlightFile;

Perform syntax highlighting on the whole file.


syntaxHighlightRange: 

- (void) syntaxHighlightRange: (NSRange)r;

Performs syntax highlighting on the specified range.




Instance Variables for SCKSourceFile Class

fileName

@protected NSString* fileName;
Description forthcoming.

source

@protected NSMutableAttributedString* source;
Description forthcoming.




Software documentation for the SCKSourceLocation class

SCKSourceLocation : NSObject

Declared in:
SCKSourceFile.h
Description forthcoming.

Instance Variables



Instance Variables for SCKSourceLocation Class

file

@public NSString* file;
Description forthcoming.

offset

@public NSUInteger offset;
Description forthcoming.