示例#1
0
        public static IParsingResultExtended Parse(ParsingContext context)
        {
            IParsingResultExtended type = StandardBuiltinType.Parse(context);

            if (type != null)
            {
                return(type);
            }

            RewindState rewind = context.RewindState;

            if (context.Parser.VerifyString("u"))
            {
                IParsingResultExtended name = SourceName.Parse(context);

                return(new Extension(name));
            }

            context.Rewind(rewind);
            return(null);
        }
示例#2
0
            public void Demangle(DemanglingContext context)
            {
                StandardBuiltinType nullptr = Type as StandardBuiltinType;

                if (nullptr != null && nullptr.Value == StandardBuiltinType.Values.Nullptr)
                {
                    context.Writer.Append("nullptr");
                }
                else if (context.GccCompatibleDemangle && !string.IsNullOrEmpty(Name))
                {
                    context.Writer.Append("(");
                    Type.Demangle(context);
                    context.Writer.Append(")");
                    context.Writer.Append(Name);
                }
                else
                {
                    Type.Demangle(context);
                    context.Writer.Append(Name);
                }
            }