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
diff --git a/Yacq/LanguageServices/Reader.Defaults.cs b/Yacq/LanguageServices/Reader.Defaults.cs | |
index 594cd20..98ca331 100644 | |
--- a/Yacq/LanguageServices/Reader.Defaults.cs | |
+++ b/Yacq/LanguageServices/Reader.Defaults.cs | |
@@ -222,9 +222,9 @@ namespace XSpect.Yacq.LanguageServices | |
var text = | |
Span( | |
from x in Chars.OneOf('\'', '\"', '`') | |
- let quote = x.Satisfy() | |
- from y in quote.Not().Right(Chars.Any()).Many().Select(_ => new String(_.ToArray())) |
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
(load "cts:Inscribe.Storage") | |
(load "cts:Inscribe.Communication.Posting") | |
AccountStorage.Accounts.(ForEach (\ [a] | |
PostOffice.(UpdateTweet a "くるるたんの腎臓ペロペローーー!!!!!!") | |
PostOffice.(UpdateTweet a "くるるたんくるるたんくるるたんくるるたんくるるたんくるるたんくるるたんくるるたんくるるたんくるるたんくるるたんくるるたん") | |
PostOffice.(UpdateTweet a "ピャァァァァァァァァァァwwwwwwくるるたん腹パン腹パン!!!!") | |
PostOffice.(UpdateTweet a "くるるたんの脳みそ汁飲みたいです^^") | |
)) |
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
internal static Type ConvertNumericType(Type expressionType, Type expectedType) | |
{ | |
var expectedType_ = Type.GetTypeCode(Nullable.GetUnderlyingType(expectedType) ?? expectedType); | |
switch (Type.GetTypeCode(Nullable.GetUnderlyingType(expressionType) ?? expressionType)) | |
{ | |
case TypeCode.Char: | |
switch (expectedType_) | |
{ | |
case TypeCode.Char: | |
case TypeCode.UInt16: |
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
Enumerable.Range(0, 10) | |
.Concat(EnumerableEx.Throw<int>(new DivideByZeroException())) | |
.ForEach(Console.WriteLine); | |
Enumerable.Range(0, 10) | |
.Concat(EnumerableEx.Throw<int>(new DivideByZeroException())) | |
.Catch((DivideByZeroException ex) => EnumerableEx.Return(-1)) | |
.ForEach(Console.WriteLine); |
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
<?xml version="1.0"?> | |
<ColoringProperty xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<MyColor A="255" R="160" G="214" B="255" IsActive="true" /> | |
<FriendColor A="255" R="255" G="255" B="255" IsActive="true" /> | |
<FollowingColor A="255" R="255" G="192" B="192" IsActive="true" /> | |
<FollowerColor A="255" R="192" G="255" B="192" IsActive="true" /> | |
<DirectMessageNameColor A="255" R="255" G="128" B="128" IsActive="true" /> | |
<DefaultNameColor A="0" R="255" G="255" B="255" /> | |
<RetweetedColor> | |
<LightColor A="255" R="214" G="255" B="214" IsActive="true" /> |
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
(newtype MyType:[Object (type "System.IDisposable")] | |
(public member X:Int32 get set) | |
(public member Y:Int32 get set) | |
(public member Z:Int32 get set) | |
(public member Sum:Int32 get (\ [self] | |
(+ self.X self.Y self.Z) | |
)) | |
(public method new [] (\ [self] |
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
// Before: | |
YacqExpression.Dispatch( | |
DispatchTypes.Method, | |
YacqExpression.Dispatch( | |
DispatchTypes.Method, | |
YacqExpression.TypeCandidate(typeof(Enumerable)), | |
"Range", | |
Expression.Constant(0), Expression.Constant(10) | |
), | |
"Reverse" |
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
Expression<Func<IEnumerable<int>, IEnumerable<int>>> expr | |
= _ => _.Select(e => e + 1).Where(e => e > 10).OrderByDescending(e => e).Reverse(); | |
EnumerableEx.Generate( | |
expr.Body, | |
e => e is MethodCallExpression, | |
e => ((MethodCallExpression) e).Arguments[0], | |
e => ((MethodCallExpression) e).Method | |
).Reverse(); |
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 bf (\ [c:String] ($ [ | |
d Int32.array.(new 30000) ; data array | |
di 0 ; data index | |
ci 0 ; code index | |
s Stack.[Int32].(new) ; jump stack | |
jc 0 ; jump counter | |
] | |
EnumerableEx.(Repeat c) | |
.(TakeWhile {!= ci $0.Length}) | |
.(ForEach {$ |
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
void Main() | |
{ | |
var code = | |
@"(<html> | |
(<head> | |
(<title> 'Yacq-XML') | |
) | |
(<body> | |
(<h1> 'Hello, YACQ World!') | |
(<p> 'Now: \$(DateTime.Now).') |