-
Notifications
You must be signed in to change notification settings - Fork 1
/
MethodKeyword.cs
52 lines (43 loc) · 1.4 KB
/
MethodKeyword.cs
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
51
52
using System.Collections.Generic;
using ErisPacketCreator.ActionScript.Interpreter.Keywords.Models;
namespace ErisPacketCreator.ActionScript.Interpreter.Keywords
{
/// <summary>
/// Models the Method Keyword from ActionScript Assembly
/// </summary>
public class MethodKeyword : IKeyword
{
/// <summary>
/// The name of the method
/// </summary>
public string Name;
/// <summary>
/// The ReferenceId of the method (call path)
/// </summary>
public ReferenceId ReferenceId;
/// <summary>
/// List of all the parameters the method take
/// <remarks>CURRENTLY NOT USED
/// TODO: IMPLEMENT THIS
/// </remarks>
/// </summary>
public List<QName> Parameters;
/// <summary>
/// The return type of the method
/// <remarks>CURRENTLY NOT USED
/// TODO: IMPLEMENT THIS
/// </remarks>
/// </summary>
public QName ReturnType;
public MethodKeyword(ActionScriptReader acr) => Parse(acr);
public IKeyword Parse(ActionScriptReader acr)
{
if (!acr.ReadString().Contains("method"))
return null;
Name = acr.ReadString().Split('"')[1];
ReferenceId = acr.ReadString();
acr.ReadStrings(2);
return this;
}
}
}