/// <summary>
            /// Constructs a debug view from a normal FullSymbol.
            /// </summary>
            /// <remarks>
            /// This constructor is required by the debugger.
            /// Consequently, Invalid AbsoluteIds are allowed.
            /// </remarks>
            public AbsoluteIdDebuggerView(FullSymbol fullSymbol)
            {
                Id = fullSymbol.Value;

                if (fullSymbol == Invalid)
                {
                    OwningSymbolTable = null;
                    Identifier        = null;
                }
                else
                {
                    OwningSymbolTable = HierarchicalNameTable.DebugTryGetTableForId(fullSymbol.Value) as SymbolTable;
                    if (OwningSymbolTable != null)
                    {
                        Identifier = fullSymbol.ToString(OwningSymbolTable);
                    }
                }
            }
Exemple #2
0
        /// <summary>
        /// Attempts to get the full symbol of the combined symbols. If this value represents a full symbol
        /// it is returned unmodified.
        /// </summary>
        public bool TryGetFullSymbol(SymbolTable symbolTable, FullSymbol root, out FullSymbol fullSymbol)
        {
            var identifier = this;

            fullSymbol = root;

            while (identifier != null)
            {
                if (!fullSymbol.TryGet(symbolTable, identifier.Head, out fullSymbol))
                {
                    return(false);
                }

                identifier = identifier.m_tail;
            }

            return(true);
        }
 /// <summary>
 /// Writes a FullSymbol
 /// </summary>
 public virtual void Write(FullSymbol value)
 {
     Start <FullSymbol>();
     Write(value.Value.Value);
     End();
 }
Exemple #4
0
 /// <summary>
 /// Attempts to get the full symbol of the combined symbols. If this value represents a full symbol
 /// it is returned unmodified.
 /// </summary>
 public bool TryGetFullSymbol(SymbolTable symbolTable, FullSymbol root, out FullSymbol fullSymbol)
 {
     return(root.TryGet(symbolTable, this, out fullSymbol));
 }
 /// <summary>
 /// Appends a string representation of <paramref name="fullSymbol"/> into <paramref name="builder"/>.
 /// </summary>
 public static void Append(this StringBuilder builder, FullSymbol fullSymbol, SymbolTable symbolTable)
 {
     builder.Append(fullSymbol.ToStringAsCharArray(symbolTable));
 }