basic access
This commit is contained in:
parent
11145e278b
commit
0da1c14ed7
2 changed files with 35 additions and 4 deletions
35
src/Bofa.bf
35
src/Bofa.bf
|
@ -60,7 +60,7 @@ class Bofa
|
||||||
case .BigInteger:
|
case .BigInteger:
|
||||||
strBuffer.Append(scope $"bi {Name} {Value.BigInteger}");
|
strBuffer.Append(scope $"bi {Name} {Value.BigInteger}");
|
||||||
case .BigNumber:
|
case .BigNumber:
|
||||||
strBuffer.Append(scope $"bn {Name} {Value.BigNumber}");
|
strBuffer.Append(scope $"bn {Name} {Value.BigNumber:R}");
|
||||||
case .Boolean:
|
case .Boolean:
|
||||||
strBuffer.Append(scope $"b {Name} {Value.Boolean ? "true" : "false"}");
|
strBuffer.Append(scope $"b {Name} {Value.Boolean ? "true" : "false"}");
|
||||||
case .Custom:
|
case .Custom:
|
||||||
|
@ -70,7 +70,7 @@ class Bofa
|
||||||
case .Line:
|
case .Line:
|
||||||
strBuffer.Append(scope $"l {Name} {Value.Line}");
|
strBuffer.Append(scope $"l {Name} {Value.Line}");
|
||||||
case .Number:
|
case .Number:
|
||||||
strBuffer.Append(scope $"n {Name} {Value.Number}");
|
strBuffer.Append(scope $"n {Name} {Value.Number:R}");
|
||||||
case .Object:
|
case .Object:
|
||||||
strBuffer.Append(scope $"o {Name}");
|
strBuffer.Append(scope $"o {Name}");
|
||||||
case .Text:
|
case .Text:
|
||||||
|
@ -152,4 +152,35 @@ class Bofa
|
||||||
else if(Type == .Array)
|
else if(Type == .Array)
|
||||||
DeleteContainerAndItems!(Value.Array);
|
DeleteContainerAndItems!(Value.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ref Bofa this[StringView view]
|
||||||
|
{
|
||||||
|
[Checked]
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Runtime.Assert(Type == .Object);
|
||||||
|
Runtime.Assert(Value.Object.ContainsKey(view));
|
||||||
|
return ref Value.Object[view];
|
||||||
|
}
|
||||||
|
|
||||||
|
[Unchecked, Inline]
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ref Value.Object[view];
|
||||||
|
}
|
||||||
|
|
||||||
|
[Checked]
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Runtime.Assert(Type == .Object);
|
||||||
|
Runtime.Assert(!Value.Object.ContainsKey(view));
|
||||||
|
Value.Object[view] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Unchecked, Inline]
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Value.Object[view] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -16,7 +16,7 @@ class Consistency
|
||||||
t textgoes here
|
t textgoes here
|
||||||
- Text addendum
|
- Text addendum
|
||||||
n tone 12.5
|
n tone 12.5
|
||||||
bn biggie 6.56456e+10
|
bn biggie 65645654535.553001
|
||||||
i int 234345
|
i int 234345
|
||||||
bi bint 38432847329847329
|
bi bint 38432847329847329
|
||||||
o object
|
o object
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue