public _Codeblock CompileCodeblock(string macro) { UsualCompilation compiler = GetUsualCompiler(true); var m = compiler.Compile(macro); if (m.Diagnostic != null) { throw m.Diagnostic; } return(new XSharp.MacroCompiler.UsualMacro.MacroCodeblock(m.Macro, m.ParamCount, macro, macro.Replace(" ", "").StartsWith("{|"))); }
public _Codeblock CompileCodeblock(string macro, bool lAllowSingleQuotes, Module module) { var isCodeblock = macro.Replace(" ", "").StartsWith("{|"); UsualCompilation compiler = GetUsualCompiler(lAllowSingleQuotes); var m = compiler.Compile(macro); if (m.Diagnostic != null) { throw m.Diagnostic; } if (m.CreatesAutoVars) { return(new XSharp.MacroCompiler.UsualMacro.MacroMemVarCodeblock(m.Macro, m.ParamCount, macro, isCodeblock)); } else { return(new XSharp.MacroCompiler.UsualMacro.MacroCodeblock(m.Macro, m.ParamCount, macro, isCodeblock)); } }