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
[Test] | |
public void ParsesNumber() | |
{ | |
var result = Parse<int>("1", x => x.Number); | |
Assert.That(result, Is.EqualTo(1)); | |
} |
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 class GitNumstatParser : Parser | |
{ | |
} |
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 void RebuildGitNumstatParser() | |
{ | |
var contents = File.ReadAllText(@"..\..\..\SharpDiff\Parsers\GitNumstatParser.ometacs"); | |
var result = Grammars.ParseGrammarThenOptimizeThenTranslate | |
<OMetaParser, OMetaOptimizer, OMetaTranslator> | |
(contents, | |
p => p.Grammar, | |
o => o.OptimizeGrammar, | |
t => t.Trans); | |
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
@@ -1,3 +1,6 @@ | |
This is a small text file | |
+that I quite like, | |
with a few lines of text | |
-inside, nothing much. |
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
string diffContent = File.ReadAllText("MyDiffFile.diff"); | |
Diff diff = Diff.CreateFrom(diffContent); |
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 bool Execute() | |
{ | |
int line, col; | |
view.GetCaretPos(out line, out col); | |
indenter.SetIndentationForNextLine(line); | |
return false; | |
} |
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 class BooViewFilter : ViewFilter | |
{ | |
public BooViewFilter(CodeWindowManager mgr, IVsTextView view) : base(mgr, view) | |
{} | |
} |
NewerOlder