Exemple #1
0
        public static object ParseType(ParserState s)
        {
            object result = null;

            if (s.Token.Type == TokenType.Operator && (s.Token.Value == "*" || s.Token.Value == "$" || s.Token.Value == "::"))
            {
                var mod = s.Token;
                ReadToken(s);
                result = new TypeModifierExpression {
                    Modifier = mod, Arg = ParseTypeModifiers(s)
                };
            }
            else
            {
                result = ParseTokenWithType(s, TokenType.Identifier);
            }
            if (s.Token.Type == TokenType.OpenAngleBracket)
            {
                return(ParseTypeArgsExpressionTail(s, result));
            }
            else
            {
                return(result);
            }
        }
Exemple #2
0
 public static void PrintTypeModifierExpression(PrintState s, TypeModifierExpression a)
 {
     PrintDescWithToken(s, "TypeModifier", a.Modifier);
     Indent(s);
     PrintAny(s, a.Arg);
     UnIndent(s);
 }
Exemple #3
0
 public static void CheckTypeModifierExpression(RangeFinderState s, TypeModifierExpression a)
 {
     CheckToken(s, a.Modifier);
     CheckAny(s, a.Arg);
 }