adadr operator
This commit is contained in:
parent
db68d9e9ce
commit
3c72680808
|
|
@ -284,6 +284,8 @@ public class Reader : IReader<Token>, IDisposable
|
|||
MakeToken(Colon, buffer),
|
||||
'&' => Check('&') ?
|
||||
MakeToken(And, buffer + Next()) :
|
||||
Check(':') ?
|
||||
MakeToken(Address, buffer + Next()) :
|
||||
MakeToken(BitwiseAnd, buffer),
|
||||
'^' => Check('~') ?
|
||||
MakeToken(Base, buffer + Next()) :
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public enum TokenType
|
|||
BitwiseNot = Operator | 9,
|
||||
BitwiseLeft = Operator | 10,
|
||||
BitwiseRight = Operator | 11,
|
||||
Address = Operator | 12, // returns the address of a ptr/object as a value
|
||||
|
||||
Assignment = 1 << 9,
|
||||
Equal = Assignment | 1,
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public readonly struct Value : IValue, ISerialize<Value>, IDebug<string>
|
|||
|
||||
string type = Type.ToString();
|
||||
if (Type.HasFlag(T.Pointer))
|
||||
type = Ptr.Value?.Type.ToString() ?? "ptr:null";
|
||||
type = $"{Ptr.Value?.Type.ToString()}@{Ptr.Address}" ?? "ptr:null";
|
||||
|
||||
return $"<{type}, {AsDynamic(false) ?? "null"}>";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue