public CoreCodeGen(Core coreObj, ProtoCore.DSASM.CodeBlock parentBlock = null) { Debug.Assert(coreObj != null); this.core = coreObj; argOffset = 0; globalClassIndex = core.ClassIndex; if (null == CoreCodeGen.CodeRangeTable) { CoreCodeGen.CodeRangeTable = new CodeRangeTable(); } if (null == CoreCodeGen.IdentLocation) { CoreCodeGen.IdentLocation = new IdentLocationTable(); } if (null == CoreCodeGen.ImportTable) { CoreCodeGen.ImportTable = new ImportTable(); } context = new ProtoCore.CompileTime.Context(); opKwData = new ProtoCore.DSASM.OpKeywordData(); targetLangBlock = ProtoCore.DSASM.Constants.kInvalidIndex; enforceTypeCheck = true; localProcedure = core.ProcNode; globalProcIndex = null != localProcedure ? localProcedure.procId : ProtoCore.DSASM.Constants.kGlobalScope; tryLevel = 0; }
public CoreCodeGen(ProtoLanguage.CompileStateTracker compileState, ProtoCore.DSASM.CodeBlock parentBlock = null) { Debug.Assert(compileState != null); this.compileState = compileState; argOffset = 0; globalClassIndex = compileState.ClassIndex; if (null == CoreCodeGen.CodeRangeTable) CoreCodeGen.CodeRangeTable = new CodeRangeTable(); if (null == CoreCodeGen.IdentLocation) CoreCodeGen.IdentLocation = new IdentLocationTable(); if (null == CoreCodeGen.ImportTable) CoreCodeGen.ImportTable = new ImportTable(); context = new ProtoCore.CompileTime.Context(); opKwData = new ProtoCore.DSASM.OpKeywordData(); targetLangBlock = ProtoCore.DSASM.Constants.kInvalidIndex; enforceTypeCheck = true; localProcedure = compileState.ProcNode; globalProcIndex = null != localProcedure ? localProcedure.procId : ProtoCore.DSASM.Constants.kGlobalScope; tryLevel = 0; }
public Parser(Scanner scanner, ProtoCore.Core coreObj) { this.scanner = scanner; errors = new Errors(); opKwData = new ProtoCore.DSASM.OpKeywordData(); core = coreObj; root = new DesignScript.Parser.Associative.CodeBlockNode(); }
/*--------------------------------------------------------------------------*/ public Parser(Scanner scanner, ProtoCore.Core coreObj) { this.scanner = scanner; errors = new Errors(); opKwData = new ProtoCore.DSASM.OpKeywordData(); core = coreObj; }