virtualSoC  0.6.2
baskett
vmasm.DefinesDef Class Reference
+ Inheritance diagram for vmasm.DefinesDef:

Public Member Functions

 DefinesDef ()
 
bool isLineADefine (string line)
 
string GetOld (string key)
 
string Get (string l1)
 

Detailed Description

Constructor & Destructor Documentation

◆ DefinesDef()

vmasm.DefinesDef.DefinesDef ( )
28  {
29  }

Member Function Documentation

◆ Get()

string vmasm.DefinesDef.Get ( string  l1)
54  {
55  // MOV FB+1, #34
56  // L1= FB+1
57  foreach (var item in this) {
58  if (l1.Contains (item.Key)) {
59  l1 = l1.Replace (item.Key, item.Value);
60  }
61  }
62 
63  return l1;
64  }

◆ GetOld()

string vmasm.DefinesDef.GetOld ( string  key)
47  {
48  if (this.ContainsKey (key)) {
49  this.TryGetValue (key, out key);
50  }
51  return key;
52  }

◆ isLineADefine()

bool vmasm.DefinesDef.isLineADefine ( string  line)
32  {
33  if (line.Contains ("#define")) {
34 
35  string[] def = line.Split (' ');
36  // 0 define
37  // 1 KEY
38  // 2 Value
39 
40  Add (def [1], Get(def [2]));
41 
42  return true;
43  }
44  return false;
45  }
string Get(string l1)
Definition: DefinesDef.cs:53

The documentation for this class was generated from the following file: