-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#pragma warning disable 0660 | ||
#pragma warning disable 0661 | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using JSIL.Meta; | ||
using JSIL.Proxy; | ||
|
||
namespace JSIL.Proxies { | ||
[JSProxy( | ||
typeof(char), | ||
JSProxyMemberPolicy.ReplaceDeclared | ||
)] | ||
public abstract class CharProxy { | ||
[JSReplacement("$c.toLowerCase()")] | ||
[JSIsPure] | ||
public static char ToLower (char c) { | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
// FIXME: Are ECMAScript strings always normalized? | ||
[JSReplacement("$c.toLowerCase()")] | ||
[JSIsPure] | ||
public static char ToLowerInvariant (char c) { | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
[JSReplacement("$c.toUpperCase()")] | ||
[JSIsPure] | ||
public static char ToUpper (char c) { | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
// FIXME: Are ECMAScript strings always normalized? | ||
[JSReplacement("$c.toUpperCase()")] | ||
[JSIsPure] | ||
public static char ToUpperInvariant (char c) { | ||
throw new InvalidOperationException(); | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
|
||
public static class Program { | ||
public static void Main (string[] args) { | ||
Console.WriteLine(char.ToLower('a')); | ||
Console.WriteLine(char.ToUpper('a')); | ||
Console.WriteLine(char.ToLower('A')); | ||
Console.WriteLine(char.ToUpper('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