Пример #1
0
		public void Verify(VerificationContext context, ASTNode node)
		{
			DataType sourceType = null;
			if (node.Children.Count > 0)
			{
				Verifier.Verify(context, node.Children[0]);
				sourceType = node.Children[0].ResultType;
			}
			else
			{
				var symbol = context.ResolveSymbol(node.GetAttribute<string>("scope", VerificationContext.Current));
				sourceType = symbol.DataType;
			}

			node.ResultType = context.ResolveProperty(sourceType, node.GetAttribute<string>("path"));

			// Save sourceType for use in translation and/or evaluation
			node.Attributes.Add("sourceType", sourceType);
		}
Пример #2
0
		public void Verify(VerificationContext context, ASTNode node)
		{
			var symbol = context.ResolveSymbol(node.GetAttribute<string>("scope", VerificationContext.Current));
			node.ResultType = symbol.DataType;
		}