public void SimpleLet() { SLLine line = SLDeclaration.LetLine("foo", SLSimpleType.Int, SLConstant.Val(5), Visibility.Public); string code = CodeWriter.WriteToString(line); Compiler.CompileStringUsing(null, XCodeCompiler.SwiftcCustom, code, null); }
void BindToValue(bool isLet, SLType type, ISLExpr value, Visibility vis) { SLLine line = isLet ? SLDeclaration.LetLine("foo", type, value, vis) : SLDeclaration.VarLine("foo", type, value, vis); string code = CodeWriter.WriteToString(line); Compiler.CompileStringUsing(null, XCodeCompiler.SwiftcCustom, code, null); }