private VariableResolveResult GetVariable(XmlNode node)
{
switch (node.Name)
{
case AstConstants.Node + ":" + AstConstants.Nodes.Expr_Variable:
return Node_Expr_Variable(node);
case AstConstants.Node + ":" + AstConstants.Nodes.Expr_StaticPropertyFetch:
return Node_Expr_StaticPropertyFetch(node);
case AstConstants.Node + ":" + AstConstants.Nodes.Expr_PropertyFetch:
return Node_Expr_PropertyFetch(node);
case AstConstants.Node + ":" + AstConstants.Nodes.Expr_ArrayDimFetch:
return Node_Expr_ArrayDimFetch(node);
// Subnodes
case AstConstants.Subnode + ":" + AstConstants.Subnodes.Var:
return GetVariable(node.GetSubNodesByPrefix(AstConstants.Node).Single());
}
return new VariableResolveResult(new Variable("$UNKNOWN$", VariableScope.Unknown), true);
}