-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRegExp.cs
More file actions
51 lines (41 loc) · 1.32 KB
/
RegExp.cs
File metadata and controls
51 lines (41 loc) · 1.32 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
49
50
//TODO! Disable missing XML comments.
#pragma warning disable CS1591
using CSharpToJavaScript.Utils;
using System.Diagnostics.CodeAnalysis;
namespace CSharpToJavaScript.APIs.JS.Ecma;
//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 : FunctionPrototype
{
public bool DotAll { get; }
public string Flags { get; } = string.Empty;
public bool Global { get; }
public bool HasIndices { get; }
public bool IgnoreCase { get; }
public bool Multiline { get; }
public string Source { get; } = string.Empty;
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 new string ToString()
{
throw new System.NotImplementedException();
}
}