This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (var argAndParameterType in invocationExpression.Arguments.Zip(method.ParameterTypes(), Tuple.Create)) | |
PreserveSemanticsForInvocationArgument(argAndParameterType.Item1, argAndParameterType.Item2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hg(command): | |
return shell("hg", command) | |
def strip(rev): | |
return hg("strip $rev") | |
def heads(): | |
return hg("heads") | |
def nextNonTipRevision(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <glib.h> | |
#include <mono/mini/jit.h> | |
#include <mono/metadata/assembly.h> | |
#include <mono/metadata/debug-helpers.h> | |
#include <mono/metadata/threads.h> | |
extern "C" { | |
#include <mono/metadata/mono-debug.h> | |
} | |
#include <mono/metadata/mono-gc.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityScript.Scripting; | |
namespace Evaluator | |
{ | |
public class Test | |
{ | |
private static EvaluationContext context = new EvaluationContext(); | |
public static void Run() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Xml; | |
function printAllTypes(file : String) { | |
var doc = new XmlDocument(); | |
doc.PreserveWhitespace = false; | |
doc.Load(file); | |
for (var text: XmlText in doc.SelectNodes("//element/type/text()")) { | |
print(text.Value); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
import UnityEditor | |
[MenuItem("Tools/Remove Unsupported Components")] | |
def RemoveUnsupportedComponents(): | |
unsupported = AudioChorusFilter, AudioDistortionFilter, AudioEchoFilter, AudioHighPassFilter, AudioLowPassFilter, AudioReverbFilter | |
for u in unsupported: | |
for o in GameObject.FindSceneObjectsOfType(u): | |
Debug.Log("destroying $o") | |
GameObject.DestroyImmediate(o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Base | |
{ | |
public Base(string s) {} | |
} | |
public class ChainToBase : Base | |
{ | |
public ChainToBase() : base("foo") {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Boo.Lang.Compiler | |
import Boo.Lang.Compiler.Ast | |
import Boo.Lang.Compiler.TypeSystem | |
import Boo.Lang.Compiler.TypeSystem.Services | |
import Boo.Lang.Compiler.MetaProgramming | |
import Boo.Lang.Environments | |
macro delegate: | |
case [| delegate $field as $fieldType |]: | |
enclosingType = delegate.GetAncestor of TypeDefinition() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IL_0000: ldarg.0 | |
IL_0001: ldfld class CompilerGenerated.__test_flakeDelegate$callable0$4_21__ test::flakeDelegate | |
IL_0006: ldnull | |
IL_0007: call bool class [mscorlib]System.MulticastDelegate::op_Inequality(class [mscorlib]System.MulticastDelegate, class [mscorlib]System.MulticastDelegate) | |
IL_000c: brfalse IL_0021 | |
IL_0011: ldarg.0 | |
IL_0012: ldfld class CompilerGenerated.__test_flakeDelegate$callable0$4_21__ test::flakeDelegate | |
IL_0017: callvirt instance void class CompilerGenerated.__test_flakeDelegate$callable0$4_21__::Invoke() | |
IL_001c: br IL_002b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
import Boo.Lang.PatternMatching | |
targetFolder = argv[0] | |
changes = ((statusLine[:1], statusLine[2:]) for statusLine in /\n/.Split(shell("hg", "st")) if len(statusLine) > 0) | |
for status, file in changes: | |
targetFile = Path.Combine(targetFolder, file) | |
match status: | |
case "M" | "?": | |
Directory.CreateDirectory(Path.GetDirectoryName(targetFile)) |