forked from TiLied/CSharpToJavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRegExp.cs
More file actions
48 lines (41 loc) · 1.23 KB
/
RegExp.cs
File metadata and controls
48 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using CSharpToJavaScript.Utils;
using System.Diagnostics.CodeAnalysis;
namespace CSharpToJavaScript.APIs.JS
{
//https://262.ecma-international.org/14.0/#sec-regexp-regular-expression-objects
[To(ToAttribute.Default)]
public partial class RegExp : RegExpPrototype
{
[To(ToAttribute.FirstCharToLowerCase)]
public static RegExpPrototype Prototype { get; } = new();
public RegExp([StringSyntax(StringSyntaxAttribute.Regex)] string pattern) { }
public RegExp([StringSyntax(StringSyntaxAttribute.Regex)] string pattern, string flags) { }
}
//TODO! match etc.!!!! How? Extension methods?
[To(ToAttribute.FirstCharToLowerCase)]
public class RegExpPrototype
{
public bool DotAll { get; }
public string Flags { get; }
public bool Global { get; }
public bool HasIndices { get; }
public bool IgnoreCase { get; }
public bool Multiline { get; }
public string Source { get; }
public bool Sticky { get; }
public bool Unicode { get; }
public RegExpPrototype() { }
public string[] Exec(string str)
{
throw new System.NotImplementedException();
}
public bool Test(string S)
{
throw new System.NotImplementedException();
}
public string ToString()
{
throw new System.NotImplementedException();
}
}
}