Beispiel #1
0
        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);
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            if (null == obj || GetType() != obj.GetType())
            {
                return(false);
            }

            return(MangledName.Equals(obj as FunctionDescriptor));
        }
Beispiel #3
0
 public override int GetHashCode()
 {
     return(MangledName.GetHashCode());
 }
Beispiel #4
0
 internal static IParsingResult Parse(ParsingContext context)
 {
     return(MangledName.Parse(context));
 }