C# Class Kirikiri.Tjs2.Compiler

Inheritance: SourceCodeAccessor
Mostra file Open project: fantasydr/krkr-cs Class Usage Examples

Public Properties

Property Type Description
FILE_TAG byte[]

Public Methods

Method Description
Add ( InterCodeGenerator gen ) : void
CodePosToSrcPos ( int codepos ) : int
Compile ( string text, bool isexpression, bool isresultneeded, BinaryStream output ) : void
Compiler ( TJS owner ) : System.Collections.Generic
DoCompile ( string text, bool isexpression, bool isresultneeded ) : ScriptBlock
Error ( string msg ) : void
GetCodeIndex ( InterCodeGenerator gen ) : int

位置を确定するために使う

GetCodeObject ( int index ) : InterCodeObject
GetLexicalAnalyzer ( ) : LexicalAnalyzer
GetLine ( int line ) : string
GetLineDescriptionString ( int pos ) : string
GetLineOffset ( ) : int
GetMaxLine ( ) : int
GetName ( ) : string
GetObjectIndex ( InterCodeObject gen ) : int
GetScript ( ) : string
GetTJS ( ) : TJS
IsUsingPreProcessor ( ) : bool
LineToSrcPos ( int line ) : int
NotifyUsingPreProcessror ( ) : void
Parse ( string script, bool isexpr, bool resultneeded ) : void
Remove ( InterCodeGenerator gen ) : void
SetName ( string name, int lineofs ) : void
SrcPosToLine ( int pos ) : int
ToJavaCode ( string text, bool isexpression, bool isresultneeded ) : void

Private Methods

Method Description
ExportByteCode ( BinaryStream output ) : void
Expr ( ) : ExprNode
ExprAddSubExpr ( ) : ExprNode
ExprAndExpr ( ) : ExprNode
ExprArrayElm ( ) : ExprNode
ExprArrayElmList ( ) : ExprNode
ExprAssignExpr ( ) : ExprNode
ExprBlock ( ) : ExprNode
ExprBlockOrStatment ( ) : ExprNode
ExprCallArg ( ) : ExprNode
ExprCallArgList ( ) : ExprNode
ExprCallArgList2 ( ExprNode node ) : ExprNode
ExprCase ( ) : ExprNode
ExprCatch ( ) : ExprNode
ExprClassDef ( ) : ExprNode
ExprClassExtender ( ) : ExprNode
ExprCommaExpr ( ) : ExprNode
ExprCompareExpr ( ) : ExprNode
ExprCondExpr ( ) : ExprNode
ExprConstArrayElm ( ) : ExprNode
ExprConstArrayElmList ( ) : ExprNode
ExprConstDicElm ( ) : ExprNode
ExprConstDicElmList ( ) : ExprNode
ExprConstInlineArray ( ) : ExprNode
ExprConstInlineArrayOrDic ( ) : ExprNode
ExprConstInlineDic ( ) : ExprNode
ExprDefList ( ) : ExprNode
ExprDicElm ( ) : ExprNode
ExprDicElmList ( ) : ExprNode
ExprDo ( ) : ExprNode
ExprExclusiveOrExpr ( ) : ExprNode
ExprExprNoComma ( ) : ExprNode
ExprExtendsList ( ) : ExprNode
ExprFactorExpr ( ) : ExprNode
ExprFor ( ) : ExprNode
ExprForFirstClause ( ) : ExprNode
ExprForSecondClause ( ) : ExprNode
ExprForThridClause ( ) : ExprNode
ExprFuncCallExpr ( ExprNode node ) : ExprNode
ExprFuncDeclArgOpt ( ) : ExprNode
ExprFuncDeclArgs ( ) : ExprNode
ExprFuncExprDef ( ) : ExprNode
ExprFunctionDef ( ) : ExprNode
ExprIdenticalExpr ( ) : ExprNode
ExprIf ( ) : ExprNode
ExprInclusiveOrExpr ( ) : ExprNode
ExprIncontextOfExpr ( ) : ExprNode
ExprInlineArray ( ) : ExprNode
ExprInlineDic ( ) : ExprNode
ExprLogicalAndExpr ( ) : ExprNode
ExprLogicalOrExpr ( ) : ExprNode
ExprMulDivExpr ( ) : ExprNode
ExprPriorityExpr ( ) : ExprNode
ExprPriorityExpr1 ( ) : ExprNode
ExprPropertyDef ( ) : ExprNode
ExprPropertyGetter ( ) : ExprNode
ExprPropertyHandlerDefList ( ) : ExprNode
ExprPropertySetter ( ) : ExprNode
ExprReturn ( ) : ExprNode
ExprShiftExpr ( ) : ExprNode
ExprStatement ( ) : ExprNode
ExprSwitch ( ) : ExprNode
ExprThrow ( ) : ExprNode
ExprTry ( ) : ExprNode
ExprUnaryExpr ( ) : ExprNode
ExprVariableDef ( ) : ExprNode
ExprVariableDefInner ( ) : ExprNode
ExprVariableId ( ) : ExprNode
ExprVariableIdList ( ) : ExprNode
ExprWhile ( ) : ExprNode
ExprWith ( ) : ExprNode
GenerateInterCodeObjects ( ) : ScriptBlock
Lex ( ) : int
PopContextStack ( ) : void
Program ( ) : void
PushContextStack ( string name, int type ) : void
Unlex ( ) : void
Unlex ( int token, int value ) : void

Method Details

Add() public method

public Add ( InterCodeGenerator gen ) : void
gen InterCodeGenerator
return void

CodePosToSrcPos() public method

public CodePosToSrcPos ( int codepos ) : int
codepos int
return int

Compile() public method

public Compile ( string text, bool isexpression, bool isresultneeded, BinaryStream output ) : void
text string
isexpression bool
isresultneeded bool
output BinaryStream
return void

Compiler() public method

public Compiler ( TJS owner ) : System.Collections.Generic
owner TJS
return System.Collections.Generic

DoCompile() public method

public DoCompile ( string text, bool isexpression, bool isresultneeded ) : ScriptBlock
text string
isexpression bool
isresultneeded bool
return ScriptBlock

Error() public method

public Error ( string msg ) : void
msg string
return void

GetCodeIndex() public method

位置を确定するために使う
public GetCodeIndex ( InterCodeGenerator gen ) : int
gen InterCodeGenerator
return int

GetCodeObject() public method

public GetCodeObject ( int index ) : InterCodeObject
index int
return InterCodeObject

GetLexicalAnalyzer() public method

public GetLexicalAnalyzer ( ) : LexicalAnalyzer
return LexicalAnalyzer

GetLine() public method

public GetLine ( int line ) : string
line int
return string

GetLineDescriptionString() public method

public GetLineDescriptionString ( int pos ) : string
pos int
return string

GetLineOffset() public method

public GetLineOffset ( ) : int
return int

GetMaxLine() public method

public GetMaxLine ( ) : int
return int

GetName() public method

public GetName ( ) : string
return string

GetObjectIndex() public method

public GetObjectIndex ( InterCodeObject gen ) : int
gen InterCodeObject
return int

GetScript() public method

public GetScript ( ) : string
return string

GetTJS() public method

public GetTJS ( ) : TJS
return TJS

IsUsingPreProcessor() public method

public IsUsingPreProcessor ( ) : bool
return bool

LineToSrcPos() public method

public LineToSrcPos ( int line ) : int
line int
return int

NotifyUsingPreProcessror() public method

public NotifyUsingPreProcessror ( ) : void
return void

Parse() public method

public Parse ( string script, bool isexpr, bool resultneeded ) : void
script string
isexpr bool
resultneeded bool
return void

Remove() public method

public Remove ( InterCodeGenerator gen ) : void
gen InterCodeGenerator
return void

SetName() public method

public SetName ( string name, int lineofs ) : void
name string
lineofs int
return void

SrcPosToLine() public method

public SrcPosToLine ( int pos ) : int
pos int
return int

ToJavaCode() public method

public ToJavaCode ( string text, bool isexpression, bool isresultneeded ) : void
text string
isexpression bool
isresultneeded bool
return void

Property Details

FILE_TAG public_oe static_oe property

public static byte[] FILE_TAG
return byte[]