C# Class Shovel.Compiler.CodeGenerator

Show file Open project: mbrezu/Shovel

Public Methods

Method Description
CodeGenerator ( List ast, List sources ) : System

Private Methods

Method Description
CompileAst ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileAtom ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileAtomValue ( ParseTree label, string content ) : object
CompileBlock ( IEnumerable ast, Types env, bool useVal, bool more ) : void
CompileBlockMeat ( IEnumerable ast, Types env, bool useVal, bool more ) : void
CompileBlockReturn ( ParseTree ast, Types env ) : void
CompileContext ( ParseTree ast, bool useVal, bool more ) : void
CompileFn ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileFnBody ( ParseTree args, ParseTree body, Types env ) : void
CompileFuncall ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileIf ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileName ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileNamedBlock ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompilePrim0 ( ParseTree ast, bool useVal, bool more ) : void
CompileSet ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompileSetVar ( string name, Types env, bool useVal, bool more, ParseTree astForPos ) : void
CompileStatements ( Types env, IEnumerable dropValueAsts, ParseTree valueAst, bool more ) : void
CompileUserDefinedPrimitive ( ParseTree ast, bool useVal, bool more ) : void
CompileVar ( ParseTree ast, Types env, bool useVal, bool more ) : void
CompiledAsInstruction ( ParseTree funAst, int actualArity, bool useVal, bool more ) : bool
EmptyEnv ( ) : Environment
ExtendFrame ( Types env, string name, ParseTree nameAst, bool placeHolder ) : void
FindName ( string varName, Types env, int startPos, int endPos, int frameNumber ) : int[]
FinishInstruction ( bool useVal, bool more ) : void
Gen ( Instruction opcode, object arguments = null, ParseTree pos = null, string comments = null, int startPos = null, int endPos = null ) : void
GenLabel ( string prefix = "L" ) : string
GenerateCode ( ) : void
IsGrefCall ( ParseTree ast ) : bool
PositionOf ( IEnumerable ast, bool>.Func pred, bool fromEnd = false ) : int?
RaiseError ( int characterStartPos, int characterEndPos, string message ) : void

Method Details

CodeGenerator() public method

public CodeGenerator ( List ast, List sources ) : System
ast List
sources List
return System