'
' Visual Basic .NET Parser
'
' Copyright (C) 2005, Microsoft Corporation. All rights reserved.
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTIBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
'''
''' A parse tree for an expression.
'''
Public Class Expression
Inherits Tree
'''
''' Creates a bad expression.
'''
''' The location of the parse tree.
''' A bad expression.
Public Shared Function GetBadExpression(ByVal span As Span) As Expression
Return New Expression(span)
End Function
'''
''' Whether the expression is constant or not.
'''
Public Overridable ReadOnly Property IsConstant() As Boolean
Get
Return False
End Get
End Property
Protected Sub New(ByVal type As TreeType, ByVal span As Span)
MyBase.New(type, span)
Debug.Assert(type >= TreeType.SimpleNameExpression AndAlso type <= TreeType.GetTypeExpression)
End Sub
Private Sub New(ByVal span As Span)
MyBase.New(TreeType.SyntaxError, span)
End Sub
Public Overrides ReadOnly Property IsBad() As Boolean
Get
Return Type = TreeType.SyntaxError
End Get
End Property
End Class