C# Class Rhino.TokenStream

This class implements the JavaScript scanner.
This class implements the JavaScript scanner. It is based on the C source files jsscan.c and jsscan.h in the jsref package.
显示文件 Open project: hazzik/Rhino.Net

Public Methods

Method Description
GetCommentType ( ) : Token.CommentType

Return the type of the last scanned comment.

Return the type of the last scanned comment.

GetCursor ( ) : int

Return the current position of the scanner cursor.

Return the current position of the scanner cursor.

GetTokenBeg ( ) : int

Return the absolute source offset of the last scanned token.

Return the absolute source offset of the last scanned token.

GetTokenEnd ( ) : int

Return the absolute source end-offset of the last scanned token.

Return the absolute source end-offset of the last scanned token.

GetTokenLength ( ) : int

Return tokenEnd - tokenBeg

Private Methods

Method Description
AddToString ( int c ) : void
CanUngetChar ( ) : bool
ConvertLastCharToHex ( string str ) : string
Eof ( ) : bool
FillSourceBuffer ( ) : bool
GetAndResetCurrentComment ( ) : string
GetChar ( ) : int
GetChar ( bool skipFormattingChars ) : int
GetCharIgnoreLineEnd ( ) : int
GetFirstXMLToken ( ) : int
GetLine ( ) : string
GetLineno ( ) : int
GetNextXMLToken ( ) : int
GetNumber ( ) : double
GetOffset ( ) : int

Returns the offset into the current line.

Returns the offset into the current line.

GetQuoteChar ( ) : char
GetSourceString ( ) : string
GetString ( ) : string
GetStringFromBuffer ( ) : string
GetToken ( ) : int
IsAlpha ( int c ) : bool
IsDigit ( int c ) : bool
IsJSFormatChar ( int c ) : bool
IsJSSpace ( int c ) : bool
IsKeyword ( string s ) : bool
IsMarkingComment ( ) : bool
IsNumberOctal ( ) : bool
IsXMLAttribute ( ) : bool
MarkCommentStart ( ) : void
MarkCommentStart ( string prefix ) : void
MatchChar ( int test ) : bool
PeekChar ( ) : int
ReadAndClearRegExpFlags ( ) : string
ReadCDATA ( ) : bool
ReadEntity ( ) : bool
ReadPI ( ) : bool
ReadQuotedString ( int quote ) : bool
ReadRegExp ( int startToken ) : void

Parser calls the method when it gets / or /= in literal context.

Parser calls the method when it gets / or /= in literal context.

ReadXmlComment ( ) : bool
SkipLine ( ) : void
StringToKeyword ( string name ) : int
TokenStream ( Parser parser, TextReader sourceReader, string sourceString, int lineno ) : System
TokenToString ( int token ) : string
UngetChar ( int c ) : void
UngetCharIgnoreLineEnd ( int c ) : void

Method Details

GetCommentType() public method

Return the type of the last scanned comment.
Return the type of the last scanned comment.
public GetCommentType ( ) : Token.CommentType
return Token.CommentType

GetCursor() public method

Return the current position of the scanner cursor.
Return the current position of the scanner cursor.
public GetCursor ( ) : int
return int

GetTokenBeg() public method

Return the absolute source offset of the last scanned token.
Return the absolute source offset of the last scanned token.
public GetTokenBeg ( ) : int
return int

GetTokenEnd() public method

Return the absolute source end-offset of the last scanned token.
Return the absolute source end-offset of the last scanned token.
public GetTokenEnd ( ) : int
return int

GetTokenLength() public method

Return tokenEnd - tokenBeg
public GetTokenLength ( ) : int
return int