Esempio n. 1
0
        static string ConvertModifierToString(PointerType.TypeModifier modifier)
        {
            switch (modifier)
            {
            case PointerType.TypeModifier.Value: return(string.Empty);

            case PointerType.TypeModifier.Pointer: return("*");

            case PointerType.TypeModifier.LVReference: return("&");

            case PointerType.TypeModifier.RVReference: return("&&");
            }

            return(string.Empty);
        }
Esempio n. 2
0
        AST.PointerType.TypeModifier VisitTypeModifier(PointerType.TypeModifier modifier)
        {
            switch (modifier)
            {
            case PointerType.TypeModifier.Value:
                return(AST.PointerType.TypeModifier.Value);

            case PointerType.TypeModifier.Pointer:
                return(AST.PointerType.TypeModifier.Pointer);

            case PointerType.TypeModifier.LVReference:
                return(AST.PointerType.TypeModifier.LVReference);

            case PointerType.TypeModifier.RVReference:
                return(AST.PointerType.TypeModifier.RVReference);

            default:
                throw new ArgumentOutOfRangeException("modifier");
            }
        }