public void Emit(string file, Report ec) { try { using (StreamWriter str = new StreamWriter(file, false)) { NativeEmitContext nec = new NativeEmitContext(str); // Includes foreach (string inc in Includes) { nec.EmitCode(NativeBridge.AddInclude(inc)); } // DLL EXPORT nec.EmitCode(NativeBridge.GetDeclaration()); // Assembler Declarations foreach (InlineAsmDeclaration adcl in AssemblyDeclarations) { adcl.Emit(nec, ec); } } } catch (Exception ex) { AssemblerErrorManager.AsmGenError(ec, ". " + ex.Message); } }
public bool Resolve(Report rc) { try { string type = GetTypeFromExprAsString(ParameterExpr); CType = GetCType(type) + GetPointerType(type); return(true); } catch { AssemblerErrorManager.AsmGenErrorResolveAsmParameter(rc, " Parameter " + ParameterName); return(false); } }