Exemplo n.º 1
0
        public override Type CheckTypes()
        {
            Type = new ValueType
            {
                Line  = Line,
                Value = "int"
            };

            return(Type);
        }
Exemplo n.º 2
0
        public override Type CheckTypes()
        {
            switch (TokenType)
            {
            case "THIS":
                Type = new ReferenceType
                {
                    Value = FindAncestor <Class>().Name.Value
                };
                break;

            case "NULL":
                Type = new ReferenceType
                {
                    Value = TokenType.ToLower()
                };
                break;

            case "STRING":
                Type = new StringType
                {
                    Value = TokenType.ToLower()
                };
                break;

            default:
                Type = new ValueType
                {
                    Value = TokenType.ToLower()
                };
                break;
            }

            Type.Line = Line;
            return(Type);
        }