コード例 #1
0
ファイル: ExprPrimary.cs プロジェクト: pgielda/CxxDemangler
        public static IParsingResult Parse(ParsingContext context)
        {
            RewindState rewind = context.RewindState;

            if (!context.Parser.VerifyString("L"))
            {
                return(null);
            }

            IParsingResult type = Type.Parse(context);

            if (type != null)
            {
                string literal = context.Parser.ParseUntil('E');

                if (context.Parser.VerifyString("E"))
                {
                    return(new Literal(type, literal));
                }

                context.Rewind(rewind);
                return(null);
            }

            IParsingResult name = MangledName.Parse(context);

            if (name != null && context.Parser.VerifyString("E"))
            {
                return(new External(name));
            }

            context.Rewind(rewind);
            return(null);
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (null == obj || GetType() != obj.GetType())
            {
                return(false);
            }

            return(MangledName.Equals(obj as FunctionDescriptor));
        }
コード例 #3
0
 public override int GetHashCode()
 {
     return(MangledName.GetHashCode());
 }
コード例 #4
0
ファイル: CxxDemangler.cs プロジェクト: pgielda/CxxDemangler
 internal static IParsingResult Parse(ParsingContext context)
 {
     return(MangledName.Parse(context));
 }